Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

C++ Syntax

hello world syntax

  • Please log in to reply
2 replies to this topic

#1 H2O Pure

H2O Pure

    CC Regular

  • Just Joined
  • PipPipPip
  • 26 posts

Posted 30 November 2010 - 10:55 PM

Hey, ive started working with C++ but there are some syntax queries i had.
I am using Visual Studio 8 and the syntax to write something to the screen is
Console::WriteLine(L"Hello World");
But all tutorials and books i read through use something along the lines of
cout >> "Hello " >> endl

My question is there a way to switch the syntax from visual studio to the 'cout'
syntax. If not what compiler could I use.
Thanks in advance
  • 0

#2 mnirahd


    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 328 posts

Posted 30 November 2010 - 11:54 PM


You're not using correct type of project. You have created CLR console application. Do the followings

1. Click New -> Project
2. in Project Type column, select Win32 as project type
3. Enter a project name, and press Ok
4. Happy C++ coding!

I hope this helps

  • 0

#3 H2O Pure

H2O Pure

    CC Regular

  • Just Joined
  • PipPipPip
  • 26 posts

Posted 01 December 2010 - 06:14 PM

Thanks for your help.
I had a C++ class last semester but we were using MC++, why I was trying to use the CLR apps.
  • 0

Also tagged with one or more of these keywords: hello world, syntax

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download