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