c++.idde - system("PAUSE")

When I add the system("PAUSE") function to my programs it does not compile
properly.
ex:
main()
{
cout << "this is line 1\n";
system("PAUSE");
cout << "this is line 2\n";
return 0;
}
displays
press any key to continue
<any key>
this is line 1
this is line 2
I happen to be programming some dos apps and this is a BIG problem for me...
PS: the same code builds correctly with DJGPP
thanks
dungeonmaster snet.net

When I add the system("PAUSE") function to my programs it does not compile
properly.
ex:
main()
{
cout << "this is line 1\n";
system("PAUSE");
cout << "this is line 2\n";
return 0;
}
displays
press any key to continue
<any key>
this is line 1
this is line 2
I happen to be programming some dos apps and this is a BIG problem for