Type: Posts; User: ZhiYi
Search took 0.02 seconds.
You mean the code looks strange? Are there better alternatives to the above code?
I do feel that the question is a little odd though.
Lets say I have a parent class called:
Then there is a derived class called Toyota, which has a method returning a pointer to the parent class and a vector of pointers...
December 11th, 2009, 09:08 PM
I created a templated class which searches for a path between 2 points in a graph. The template parameter takes in a class representing the graph.
template <class graph_type>
August 25th, 2009, 06:24 AM
thanks for the explanations! :o
August 24th, 2009, 11:29 AM
I came across a piece of code which is a RTTI class. (run time type information). The class is called "RTTI".
There are a few defines below the class declaration and one of them is this:
March 12th, 2009, 07:33 PM
Ok........it works now, thanks! :D
March 12th, 2009, 01:31 AM
I am using visual studio 2008 professional and during compilation, the errors and warnings are all displayed together, making it hard to identify the error messages.
How do I remove the compile...
February 9th, 2009, 02:32 AM
yes, the data is in memory.
Well i guess i'll use structures instead. Thanks all for the advice :)
February 6th, 2009, 04:07 AM
I would like to save in-game data like player's health, ammo power etc into memory.
The reason is that the game is split into states with each level represented by a state. When a level loads,...
February 2nd, 2009, 11:52 PM
I have tried using this:
BaseClass* bc = dynamic_cast<DerivedClass*>ReturnClassType();
But there was still an error. Is the dynamic cast done correctly?
February 2nd, 2009, 10:47 PM
I have a base class pointer which is assigned a derived class. Can this pointer call methods in the derived class which are not declared in the base class?
January 28th, 2009, 03:36 AM
No wonder the values are so strange.
Is declaring an extern float in a .h file and including the header file in the 2 classes the correct method to use that global variable?
January 28th, 2009, 03:28 AM
I have created a program wide global variable in a .h file called globals.h
Inside the .h file, the global variable is declared as:
extern float g_fFrameTime;
2 other classes use this global...
October 1st, 2008, 11:21 AM
Is it to create a new window sized bitmap for copying and clearing for each frame?
Is there an alternative method to this as the window already has 2 bitmaps, one of which is a 2D terrain which is...
September 25th, 2008, 09:54 AM
I have drawn a bitmap image using GDI+ in C# on a windows form and would like to rotate the image while the up arrow key is pressed.
The effect I would like to get is to see the image move in a...
April 9th, 2008, 12:04 PM
There is a zip file which contains a folder inside it. The folder itself contains a few files. I would need to know how to extract the folder (with its contents) from inside a zip file.
April 4th, 2008, 12:47 PM
I created a bitmap object and used it to draw a 2D terrain programatically. Then I also added a picturebox control to display an image near the terrain.
However, the picturebox control is...
April 3rd, 2008, 08:25 PM
i've printed out the exception message and it says that the zip file must have at least 1 entry.
java.util.zip.ZipException: ZIP file must have at least one entry
April 3rd, 2008, 10:29 AM
Yep, I guess the problem is that the control is not actually added to the form. Thanks!~ :)
April 3rd, 2008, 05:36 AM
I have a method which performs zipping. I took the zipping code found on the net and modified it to make sure that folders can be zipped as well.
When using the code to zip a folder, it always...
April 2nd, 2008, 09:25 AM
I have a picturebox which was created programatically and its location should be determined when the form loads.
I set the location property to a point but no matter what point is set, the...
April 2nd, 2008, 05:12 AM
I have a java project in JCreator and the project is organised into packages. I have also configured JCreator to provide 2 arguments to the main method when the project is executed.
I would want...
March 30th, 2008, 12:00 PM
For these 2 types of const pointers, what is the difference between them?
const int * pData2; and
int * const pData3;
March 27th, 2008, 04:47 AM
If I have a <file> </file> element in an XML file and I want to insert a filename of the form PED<yyMMdd>232, how do I insert the < and > brackets as an element value inside the <file> tag?
March 12th, 2008, 03:43 AM
I have an xsd file which the SAXParser is to parse and use it to validate some xml files.
I used the setEntityResolver and parse methods of the SAXParser and a custom class called...
Click Here to Expand Forum to Full Width