I have been doing TC++ programing for the last 2 years.. This evening all of a sudden I made the switch to vc++.. here is the code.. my first ever Visual C++ programme.. it is compiling without errors but the console window poped and disappeared quickly.. what is wrong? something similar to getch() missing or what?

// test2.cpp : Defines the entry point for the console application.

#include "stdafx.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
	cout<< "Hello world";
	return 0;
7 Years
Discussion Span
Last Post by WaltP

Put in a cin.get(); in between lines 9 and 10. It's along the same lines but it's also nice and standard.

Edited by jonsca: n/a


Also, you did not start the program by defining a console program.

_tmain() and stdafx.h are not standard and supplied by VC because of the type of program you told it to create.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.