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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Here

Status
Not open for further replies.

mhykhh06

Programmer
Dec 10, 2003
4
0
0
PH
Hi,

I'm new at using Visual C++. Can someone please tell me how to show the line numbers on the Editor Window (where you write your Codes)

Thanks.
 
What compiler are you using? Some compilers do not support line numbers...
 
Im using Visual C++ 6.0. I dont know about the compilers it uses though.
 
VC++6 doesn't have the feature you request.

/Per
[sub]
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."[/sub]
 
To write your code the easiest way to do it is click the new icon on the toolbar and save it as a *.cpp file. Then write your code and compile it to run the program. the shortcut key to compile is Ctrl-F7. The proper way to start a new project is Click File->New then a pop up dialog box will appear. Select the type of project your wanting to make. Most likely since your new to C++ it will be "Win32 Console Application". Type the name in the project name field and then click OK. Another dialog box appears and you have a few more options, you will probably want to create an empty project. Click Finish. Then you will need to click File->New again. Select C++ Source file form the dialog box then type the name of the file you are going to create and click OK. That is it all you have to do now is code your heart out. Hope that helps you get started ;)
 
If you need to see the line number you are on, look at the lower right corner in the status bar. It will say something like "Ln 73, Col 12" meaning the cursor is on line 73 at position 12 of the line.

If you want to jump to a particular line, you can hit Ctrl-G, make sure Line is selected on the left, enter the line number on the right, and hit enter.

If you get compiler errors or warnings that mention a specific line, you can just double click on that error or warning in the output window and the file will come up with the cursor on the appropriate line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top