472,805 Members | 937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

display line numbers

I am reading my textbook and doing the code examples in MS Visual C++ 6.0
for my next class beginning Jan 05. The textbook examples show line numbers.
How do I get line numbers to show as I type in the examples? tia drew
Jul 22 '05 #1
5 14422

"drew" <dr*********@yahoo.com> wrote in message
news:xTEwd.1679$5m3.920@trndny04...
I am reading my textbook and doing the code examples in MS Visual C++ 6.0
for my next class beginning Jan 05. The textbook examples show line
numbers. How do I get line numbers to show as I type in the examples? tia
drew


That depends on the program you're editing your code in. None of the
editors I use show the lne numbers beside the code I'm writing (at least not
by default). That's possibly because line numbers are not relevant in C++.
In BASIC, they had meaning, but not in C++. The line number is often
displayed somewhere in the window, usually in a "stutus line" at the bottom
of the screen. But again, that depends entirely upon the editor (IDE) being
used, and what settings you choose for it.

Why do you need the line numbers? Just make your code look like the code in
the book. And remember, C++ does not (in most cases) care about the
formatting of the text. For example, the following code snippets are
identical:

for (int i = 0; i < N; ++i) { if (DoSomething(i)) DoSomethingElseToo(N);
else break; }

and...

for (int i = 0; i < N; ++i)
{
if (DoSomething( i ))
DoSomethingElseToo( N );
else
break;
}
So, line numbers really wouldn't help you much here, right? But if you
really want them, check the documentation for the program you're using to
edit your code, and see if that's an option.

-Howard
Jul 22 '05 #2
drew wrote:
I am reading my textbook and doing the code examples in MS Visual C++ 6.0 for my next class beginning Jan 05. The textbook examples show line numbers. How do I get line numbers to show as I type in the examples? tia drew


Of course this is off-topic in this group. But under the 'Tools Menu'
select 'Options...'. Click on the 'Text Editor' folder and then the
'All Languages' folder. There's a 'Line Numbers' check box.
This is VC 7.0 but 6.0 should be similar enough.

Jul 22 '05 #3
On Fri, 17 Dec 2004 17:41:49 GMT in comp.lang.c++, "drew"
<dr*********@yahoo.com> wrote,
I am reading my textbook and doing the code examples in MS Visual C++ 6.0
for my next class beginning Jan 05. The textbook examples show line numbers.
How do I get line numbers to show as I type in the examples? tia drew


That is a question not about C++ programming, which is the topic of
this newsgroup, but rather about how to drive the particular editor
you are using.

See the message posted twice per week in comp.lang.c++ under the
subject "Welcome to comp.lang.c++! Read this first." or available at
http://www.slack.net/~shiva/welcome.txt

Jul 22 '05 #4
http://www.wholetomato.com/ has an addon for Visual Studio that will
give you line numbers.
I don't know which version has it.

The product is not free however.

Jul 22 '05 #5
drew wrote:
I am reading my textbook and doing the code examples in MS Visual C++ 6.0 for my next class beginning Jan 05. The textbook examples show line numbers. How do I get line numbers to show as I type in the examples? tia drew


Of course this is off-topic in this group. But under the 'Tools Menu'
select 'Options...'. Click on the 'Text Editor' folder and then the
'All Languages' folder. There's a 'Line Numbers' check box.
This is VC 7.0 but 6.0 should be similar enough.

Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Arun Bhalla | last post by:
Hi, I'm developing an Explorer bar using VS.NET 2003 (C#) on Windows XP. For some time, I've noticed that I don't have filenames and line numbers appearing in my exceptions' stack traces. On...
2
by: rammohan | last post by:
i want to implement an option similar to line numbers option in c# editor. how can i display line numbers on left side in text box.how can i know the present cursor location with respect to...
1
by: veena | last post by:
can u help to build line numbers option which is very similar to line numbers option in text editor using c# and how can we set our own bullet style to selected bullet property in rich text box.
0
by: Navin | last post by:
Hi, I am making a code editor in C# and want to display line numbers to the left. I have a UserControl with a ListView docked to the left edge and a TextBox that makes up the rest. I am able to...
0
by: BillGatesFan | last post by:
I'm trying to display line numbers in the stack trace so that when I write the stack trace to the error log table it will tell me what line the error occured on. But I'm reading in some places that...
2
by: genojoe | last post by:
The following shows me the last line number executed. It requires an error. 7811: Try Err.Raise(60000) Catch ex As Exception MsgBox("Error 60000 at " & Err.Erl()) End Try Is there a way...
4
by: Susan Baker | last post by:
Any one knows how to do this? I am using VC7.1 on .Net 1.1 Thanks
2
by: LineVoltageHalogen | last post by:
Can anyone tell me if you can display line numbers in the query window of SQL 2005 Management Studio and if so how do I go about doing it? Thanks a bunch. TFD
1
by: =?Utf-8?B?RG90TmV0RGV2?= | last post by:
Hi, I don't know what I changed, but now when I debug an application I don't see the exact line number in the stack trace. I do see the functions but not the line numbers. Some times its very...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.