VS.NET Help

This is a discussion on VS.NET Help within the C++ Programming forums, part of the General Programming Boards category; I just started to use VS.NET to write some C++ and when i build my project (Win 32 Console Application) ...

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    4

    VS.NET Help

    I just started to use VS.NET to write some C++ and when i build my project (Win 32 Console Application) and run it it just turns off right away. This is not what VS 6 did. There was a prompt telling you to "press any key to continue".

    This is what i see after i run the program.

    "'2_21.exe': Loaded 'C:\Documents and Settings\Neil\My Documents\Visual Studio Projects\2_21\Debug\2_21.exe', Symbols loaded.
    '2_21.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
    '2_21.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
    The program '[3632] 2_21.exe: Native' has exited with code 0 (0x0)."

    Can anyone tell me what im doing wrong here?

    This is my test program thats not running:

    Code:
    #include <iostream.h>
    
    int main()
    {	
    	int i;
    	for(i = 0; i < 10; i++)
    	{
    		cout << i;
    	}
    	return 0;
    }

  2. #2
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942

    Visual Studio 6

    Visual C++ automatically inputs system("PAUSE"); at the end of the program before the return 0;

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    4
    Ah ok, so what is the command to stop it right before "return 0;"? I guess i can just use cin but is there a proper way of doing this?

    Damn i've done too much PHP lately i can't remember anything about C++

  4. #4
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942
    cin.get();

  5. #5
    Registered User
    Join Date
    May 2003
    Posts
    4
    Ok sweet, thanks, now theres no stopping me

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DevC++ different than VS.net C++? - problem!
    By patricio2626 in forum C++ Programming
    Replies: 3
    Last Post: 11-12-2006, 08:29 AM
  2. VS.NET 2003 and C programs
    By charlesmarshall in forum C Programming
    Replies: 6
    Last Post: 09-30-2004, 05:58 AM
  3. A VS.NET Problem
    By Korn1699 in forum Tech Board
    Replies: 1
    Last Post: 11-23-2002, 08:33 PM
  4. VS.NET Meets The Standard
    By Witch_King in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 09-04-2001, 10:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21