|
-
Mar 20th, 2002, 03:15 PM
#1
Thread Starter
Junior Member
Test for Key press
Im a complete newbie at C++
I have created an object using a constructor. When an object is created a message is displayed on screen. I want to be able to display this message on the screen until a user presses a key before the program returns to main.
In the main i have
void main()
{
object new_object("Display This");
object2 new_object2;
new_object2.afunction();
}
The constructor code is
object: bject(char adsupplied[])
{
while(??)
{
cout << text<<endl;
}
}
I know a need a while loop in the constructor but do not now how to detect if a key is pressed.
Any help would be appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|