Golem, well I didn't remember that one :D
Type: Posts; User: kitten
Golem, well I didn't remember that one :D
You can initialize all the elements of array with the same value, but you can't input different values to the constructor when creating array. If you need different values in objects in array, you...
oh sigh, it is easier to point you a good tutorial that write here n pages of text. :D
So here you go: http://firstpod.tripod.com/cpp21/ and chapter 12 and 13. It's really a good tutorial, nothing...
There is no such way in graphic modes, because graphic modes don't have text lines. So the way to clear text is to draw a rectangle with background color to cover it.
NULL doesn't really mean anything else but a pointer with value of zero. This generally indicates that the pointer isn't pointing to anywhere.
A pointer is an address to an object in memory. So if...
Whopsey... I missed the point in the question :D
It's definately not pascal code. I've written pascal some 5 years ago. Pascal's more C-like language.
getch() in <conio.h>
Winterwolf:
If you want to use an array in a function where it isn't visible, you must give a pointer to the array for the function. Then you can use the entire array via pointer. The pointer...
Winterwolf>
nononononoo! No code in header! :)
Put your class definition in header:
class Monster
{
// whatever
};
Yes it is :D
Array with classes is done exactly the same way you would do array with structs. In a matter of fact only difference between struct and class is that default visibility is public in struct and...
Ok, you can easily test if a floating point variable has desimal numbers.
if (Variable == (int)Variable) // test if there is no desimals
if ( !(Variable == (int)Variable) ) // test if there are...
Well, nobody prevents you from making your variables public, and it's not illegal or something :) Making them private is just a commonly used method because it's safer and more bug free.
....Thanx...
Oh yeah... I forgot that :D
There is no desimals in integer... period:)
Accessing class' variables via set and get functions is a common way to do it. And there is no other good way if the variables are private (like they should always be). So examples of accessor...
Inline functions should be written in header files. Usually every function is in its own "code region" and when the function is called its parameters are put into the stack and program's execution...
Wrong! There sure is possible solution. Look at this:
const int Xsize = 20;
const int Ysize = 30;
const int Zsize = 80;
char ***3DArray;
// Allocating array:
DirectX is more difficult that OpenGL. But if you want your software to work in any Windows then DirectX is your choice. There is also various graphics libraries that can give you 13h mode, such as...
Look for the links in this board's FAQ... There is a few good ones.
Nope...
lworlds::~lworlds() {
delete name;
}
// should be:
lworlds::~lworlds() {
delete [] name;
// defined MyErrorCode class:
class MyErrorCode
{
public:
MyErrorCode(const char* Msg) : ErrorMessage(Msg) {}
void PrintError(void) { cout << MyErrorCode; }
DirectSound can handle things like that... I don't know anything about DS though :D
Do you close the file after you've finisher reading/writing it? The OS won't open same file twice a row.