Archived

This topic is now archived and is closed to further replies.

garconbifteck

is this meant to open in a dos prompt window?

Recommended Posts

I''ve just started sams teach yourself c++ in 21 days (i''m on day 3) and in the book when you make all these little programs it guides you to make it says "Will print straight to the screen" now when i make and compile them a dos prompt window opens with the text/sum etc. printed. i just wanna check that they are supposed to be opening in a dos prompt window and i am not doing something hideously wrong, I am using the free borland compiler and i have a gui for it. Here is the thing.

#include int main() { std::cout << "Is this supposed to open in a dos prompt win the book says it prints straight to the screen (type something and push enter to close)\n"; int x; std::cin >> x; return 0; } and i have stuck it here if you wanna download it to see what i mean http://pcgaming.brinkster.net/dosornot.exe Please help. ---
 -http://garconbifteck.cjb.net/
  -www.pc-gaming.com
Garcon Bifteck

Share this post


Link to post
Share on other sites
oops some of that didnt come out right.....






#include <iostream>



int main()

{

std::cout << "Is this supposed to open in a dos prompt win the book says it prints straight to the screen (type something and push enter to close)\n";

int x;

std::cin >> x;

return 0;

}



---

 -http://garconbifteck.cjb.net/
  -www.pc-gaming.com
Garcon Bifteck

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes that''s normal; only it''s called a console window, not a DOS-prompt window (many people are confused by the fact that DOS apps run in a console window). A win32 console application is just a ''normal'' win32 app with an automatically allocated console.

Share this post


Link to post
Share on other sites