Original Post
I recently discovered that when I used cout and had a pausing statement after, the text would display after the pause was over. Here's the code that does this:
Source one will wait for a key, and then display "Hello", instead of doing this backwards. Source two uses printf instead of cout and it works the way I want it to. Now, here's my question. Is there any way that I can use cout instead of printf and it not do the above? I don't mind using the printf function to print text only, but it gets complicated when you use variables and you need to print them to the screen. Cout is just more convienent. Thanks for any help.
RyanC
---------------------------
Games are only as good as you make them...
Edited by - ryanc on 10/24/00 7:03:27 PM
// Source one
#include <iostream.h>
#include <conio.h>
int main()
{
cout<<"Hello\n";
while(!kbhit());
return 0;
}
//Source two
#include <stdio.h>
#include <conio.h>
int main()
{
printf("Hello\n");
while(!kbhit());
return 0;
} |