7 Posted Topics
As firstPerson was saying, you only need to seed before you call standart rand() function. [CODE] // This program print out 10 numbers between 0 and 100 #include <iostream> #include <cstdlib> #include <ctime> int main() { const int NUM = 10; srand(time(NULL)); for(int i = 0; i < NUM; i++) …
I supose your project is WIN32 and you include windows.h (winuser.h)?!?
I am not intending to tell what is good and what is bad. Sometimes using Singletons can simplify the code a lot. Think about this, in a game we probably want to have a bunch of classes which have manager purposes. For example: TextureManager, ShaderManager, EventManager, StringManager, SoundManager, Application and …
Standart definition of main is: int main() or int main(int , char**) Conio.h is a Microsoft header file, so NOT every compiler has it. You can check in include directory of your compiler.
I hope this will help you [CODE] #include <iostream> using namespace std; int main() { int height = 0; cin >> height; if(height < 1) { return 1; } for(int i = 1; i <= height; i++) { for(int j = 0; j < i; j++) { cout << (1 …
Actually correct Copy constructor is MyClass::MyClass(const MyClass& rhs); So in your case: Cnoeud::Cnoeud(const Cnoeud & oNOE) and you MUST not change oNOE in the constructor. So in that case you must use const_iterator to iterate.
I just want to complete what Fbody did, and add a few more things. If you want to take an integer from the console, you must use int (instead of char). Standart isdigit() function takes an int as an argument, but uses it as a char actually. Logically that function …
The End.
subtracktor