Visual C++ output window

Mar 29, 2008 at 1:45pm
Hi, i am really really new to C++, i'm using Visual C++ 2008 express edition. I'm trying to print a word on screen. its very simple program, but i can't see the output window, it disappears right after i run the program. How can i see the word im trying to print? and do i have to include <iostream> in my program?

1
2
3
4
5
6
7
8
9
#include "stdafx.h"
#include <iostream>

int main()

{
	std::cout << "Welcome to C++!\n";

	return 0;
Last edited on Mar 29, 2008 at 1:46pm
Mar 29, 2008 at 2:51pm
closed account (z05DSL3A)
Starting your project (program) with the menu "debug->start without debugging" or ctrl+F5 will pause the output window on program exit.

or call system ("pause"); just before returning from main.
Last edited on Mar 29, 2008 at 2:53pm
Mar 29, 2008 at 6:02pm
thanks :)
Topic archived. No new replies allowed.