Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using visual c++

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi,
i am a beginner to c++ and i am using a turbo c++ book, but visual c++ book. could u please tell me how to work "hello world" in visual c++? when i use just a text file to write the program, they say "cannot execute...". and if i go to file|new, there are so many choices, i don't no which one to use. could u please help me? thanx a lot.
 
Okay..

Click "File"
Select "New"

Under the tab: "Projects"
You'll see a whole bunch of choices. The one you are probably looking for is...
"Win32 Console Application"

Select that one and then enter a "Project Name" (which is the text box located on the right hand side)

Then click okay.

You will then see wizard for creating a "Console Application"

From there you can select "A Hello World Application"... But for the learning's sake, select "An Empty Project"

Click "Finish"

Now - you have an empty workspace. One again, click "File" and then "New"

Now, under the tab Files,
select "C++ Source File"

Enter a file name on the right (something like: "HelloWorld.cpp") and then click "OK"

Now you have your file and you're all set to go!!

Type in your stuff:
(eg)
Code:
#include <iostream.h>
int main() {
  cout << &quot;Hello World!&quot; << endl;
}

And then click &quot;Build&quot; (a menu item on top)

then click &quot;Execute _projectname.exe&quot; (ctrl+f5)
- or -
&quot;debug&quot; and etc.. (f5)


Hope this gets you started. Good luck. : )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top