471,356 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

compilling a c++ program

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
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 21 '05 #1
5 1089
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" <jo*****@kmmnet-dot-com.no-spam.invalid> wrote in message
news:42********@127.0.0.1...
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
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Jul 21 '05 #2
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/de...rl=/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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3
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
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 21 '05 #4
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.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5
Hi Jeff,
Thank you for your reply. I will follow your direction. Joe
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

22 posts views Thread by edgrsprj | last post: by
11 posts views Thread by christopher diggins | last post: by
1 post views Thread by Eric Whittaker | last post: by
5 posts views Thread by boksi | last post: by
6 posts views Thread by pkochanek | last post: by
9 posts views Thread by Hemal | last post: by
7 posts views Thread by ibtc209 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.