| sherlock (39) | |
|
I want it to wait 15 seconds im on windows. sleep(15) Sleep(15) nether work? | |
|
|
|
| shacktar (1116) | |
The parameter is milliseconds:Sleep(15000);
| |
|
|
|
| sherlock (39) | |
| Just says sleep is undeclared. | |
|
|
|
| whitenite1 (705) | |
Did you add #include <windows.h> ?
| |
|
|
|
| sherlock (39) | |
|
Ok works. This is my full code while (pause == 1) { Sleep(1000); date += 1; cout << date + "\n"; } but it has weird output it is pauseauseusesee and i want it to say the date? | |
|
|
|
| sherlock (39) | |
| iF I REMOVE THE \N IT WORKs but it need a line break. | |
|
Last edited on
|
|
| Moschops (5961) | |
| What type is date? I can't think of a type that would responed sensibly to having the number 1 added to it, AND having "\n" added to it. | |
|
|
|
| NwN (591) | |
|
Hi there, What you mean to use is this: cout << date << "\n"; All the best, NwN | |
|
|
|
| sherlock (39) | |
| works like a charm :) | |
|
|
|