compilling a c++ program

  • Thread starter Thread starter boksi
  • Start date Start date
B

boksi

Hello,
I wish to do the simplest thing in Visual Studio.net. I wish to
compile a "hello world" C++ program. I just installed .net and have
experience as a programmer but the framework is so large and abstract
I am having trouble getting started. Can anyone help? Thank you. Joe
 
Within Help, Index - type in compiler or "cl.exe" - should give you what you
need to know and more.

--
Star Fleet Admiral Q @ your service!
"Google is your Friend!"
www.google.com

***********************************************

boksi said:
Hello,
I wish to do the simplest thing in Visual Studio.net. I wish to
compile a "hello world" C++ program. I just installed .net and have
experience as a programmer but the framework is so large and abstract
I am having trouble getting started. Can anyone help? Thank you. Joe
 
Joe... The wizard builds a hello world program for you if select new
Project --> Visual C++ Project --> Console Application. The string
appears and the console closes. To stop the console add a call to
Console::ReadLine().

#include "stdafx.h"

#using <mscorlib.dll>

using namespace System;

int _tmain()
{
// TODO: Please replace the sample code below with your own.
Console::WriteLine(S"Hello World");
Console::ReadLine(); //<-- add this
return 0;
}

http://msdn.microsoft.com/library/default.asp?url=/library/en
us/cptutorials/html/hello_world_in_managed_extensions_for_c__.asp

Regards,
Jeff
I wish to do the simplest thing in Visual Studio.net. I wish to compile
a "hello world" C++ program. I just installed .net and have experience
as a programmer but the framework is so large and abstract I am having
trouble getting started. Can anyone help? Thank you. Joe
 
Hello, Thank you both for your reply. The help d.exe explains a lot.
But, Jeff, when I tried to follow your direction I found no console
application in the C++ projects. I did find a console application in
the C# projects. I am groping, sorry, what am I doing wrong? Joe
 
Bobski... Perhaps I am using a different version. I have VS Pro 2003.
You should be able to create an empty project, add a new item a C++
class file and just paste in the code I posted.

Regards,
Jeff
But, Jeff, when I tried to follow your direction I found no console
application in the C++ projects.
 
Back
Top