473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 14481

"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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.