473,386 Members | 1,712 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.

Navigating C++

As a Perl programmer for many years, this week I decided to stick my
toe back into C for a specific project.

During which I was tinkering with C++, which I have no production
experience in.

I am embarrased to say I am having soem difficulty navigating C++ in
Linux.

I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.

I have no problems finding my perl and c man documentation, and the C++
compiler is installed and works fine.

So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.

Second, I realize that there are C++ extensions and OO libraries and so
on. In Perl, I would just visit CPAN for these things.

How and where do I browse the available library of contributed C++
libs?

For example, I want to parse posix command line options, which in C I
would do with getopt_long. I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
to *find* these types of libraries?
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #1
15 1641
brundlefly76 wrote:
So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.
If you know just enough C++ to select distinct keywords, you can use Google
for all the intermediate and advanced stuff.

However, the 'man' for C++ is at your local bookstore.

Perl hides the lowest-level details, such as your memory system. C++
requires you to remain aware what points to what. You cannot write a C++
program based on 'apropos' and 'man'. Crack a book.
Second, I realize that there are C++ extensions and OO libraries and so
on. In Perl, I would just visit CPAN for these things.

How and where do I browse the available library of contributed C++
libs?
Nobody can contribute C++ to a single repository, because C++ has no common
package management system. CPAN depends on absolutely everything using
Makefile.PL properly. C++ has no equivalent, because C++ programs have
greater freedom to abuse your CPU.
For example, I want to parse posix command line options, which in C I
would do with getopt_long. I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
to *find* these types of libraries?


www.google.com and http://groups.google.com

thence www.boost.org , http://sf.net , and thousands of different code
sample and repository sites.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 23 '05 #2
"br**********@hotmail.com" <br**********@hotmail.com> writes:
I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results. 'man for' isn't useful either.
So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them. I think html pages are more useful. Some may well be on your system.

Second, I realize that there are C++ extensions and OO libraries and so
on. In Perl, I would just visit CPAN for these things. How and where do I browse the available library of contributed C++
libs?

http://www.boost.org/ is a good place to start. See also the FAQ
http://www.parashift.com/c++-faq-lit...libraries.html

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #3
Hi,

br**********@hotmail.com wrote:
I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.

I have no problems finding my perl and c man documentation, and the C++
compiler is installed and works fine.

So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.
Yes, the C++ documentation does not usually follow what is considered to
be a "Unix tradition". I've never seen man pages for C++ standard library.
Taking into account that "man printf" works fine (OK, "man 3 printf"), I
agree that the lack of "man cout" can be irritating.

Try these pages:

http://www.roguewave.com/support/doc...Pro/stdlibref/
http://www.cppreference.com/
http://www.sgi.com/tech/stl/
How and where do I browse the available library of contributed C++
libs?


I've found this index to be quite comprehensive:

http://www.trumphurst.com/cpplibs/cpplibs.phtml
--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Jul 23 '05 #4
In comp.os.linux.misc br**********@hotmail.com <br**********@hotmail.com> wrote:
I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.
There is no reason it should - that's part of C++.
I have no problems finding my perl and c man documentation, and the C++
compiler is installed and works fine.
Good.
So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.
There is a man page for the compiler. If you want to know how to
program in C++, you have to buy a book (as for any language) or some
other dcumentation.
Second, I realize that there are C++ extensions and OO libraries and so
I don't realise. Libraries will have their man pages.
on. In Perl, I would just visit CPAN for these things.
"just"?!
How and where do I browse the available library of contributed C++
libs?
Libraries, once compiled, are not (particularly) specific to a
programming language. The linker links with their exported symbols, not
to the language they are written in. All you need to know is the
calling convention (;)>. And maybe sme declarations.
For example, I want to parse posix command line options, which in C I
would do with getopt_long.
Then you can do it just fine with getopt_long in C++.
I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
I presume so too. Google.
to *find* these types of libraries?


"the universe".

Peter

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #5
mjt
("br**********@hotmail.com" <br**********@hotmail.com>) scribbled:
So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.
.... info gcc, info g++
How and where do I browse the available library of contributed C++
libs? For example, I want to parse posix command line options, which in C I
would do with getopt_long. I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
to *find* these types of libraries?


.... probably best to visit the bookstore for
a reference on this. as you know, too, you
can use C functions using c++

--
<< http://michaeljtobler.homelinux.com (L7 - Stick to the Plan) >>
All who joy would win Must share it --
Happiness was born a twin. - Lord Byron

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Jul 23 '05 #6
br**********@hotmail.com wrote:
As a Perl programmer for many years, this week I decided to stick my
toe back into C for a specific project.

During which I was tinkering with C++, which I have no production
experience in.

I am embarrased to say I am having soem difficulty navigating C++ in
Linux.

I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.
Try 'man Namespace_std' (I happen to know this is the correct manual
page, but I don't know whether you will have it).
I have no problems finding my perl and c man documentation, and the C++
compiler is installed and works fine.

So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.
The C++ library for g++ has inline documentation in the code which can
be extracted and processed by doxygen into various forms, including
manual pages. Not all Linux distributors necessarily build and
distribute these.

There is a separate documentation page for each function, function
template, class, class template and namespace. Static objects, type
aliases and enumerations are documented on the manual pages of their
containing scopes. Note that the manual page names include
namespace qualification ('std::' prefix for almost everything in
the standard libary).
Second, I realize that there are C++ extensions and OO libraries and so
on. In Perl, I would just visit CPAN for these things.

How and where do I browse the available library of contributed C++
libs?
There is no single site acknowledged as *the* place to find open
source C++ libraries. The Open Directory may be of help:
<http://www.dmoz.org/Computers/Programming/Languages/C++/Class_Libraries/>.
I would tend to look first in Boost, as the Boost libraries are
generally acknowledged to be of a high standard and they work well
with the standard library and are portable.
For example, I want to parse posix command line options, which in C I
would do with getopt_long. I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
to *find* these types of libraries?


Boost.Program_options does this (and more if you want it).

--
Ben Hutchings
Having problems with C++ templates? Your questions may be answered by
<http://womble.decadentplace.org.uk/c++/template-faq.html>.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Jul 23 '05 #7
br**********@hotmail.com wrote:
So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.
C++ has a fairly different culture than Perl. Part of this is that
there is not just one implementation of C++ which results in some
difference. You already stubmbled of the fact that not all C++
implementations come with man pages. I haven't checked recently
but I seem to remember that I have seen info(1) pages shipping for
parts of the C++ library with gcc. Other compilers, e.g. SUN's
actually have man pages. The primary source of information in C++
are books.
Second, I realize that there are C++ extensions and OO libraries and so on. In Perl, I would just visit CPAN for these things.


Yes, and having just one implementation of Perl makes it viable to
more less automatically access them. For C++ you would probably
visit Boost (<http://www.boost.org/>) for some form of open and
free library but it does not include all C++ libraries. Due to a
rather wide range of different programming styles, it is unclear
whether just one library archive is really viable.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #8
"br**********@hotmail.com" <br**********@hotmail.com> writes:
As a Perl programmer for many years, this week I decided to stick my
toe back into C for a specific project.

During which I was tinkering with C++, which I have no production
experience in.

I am embarrased to say I am having soem difficulty navigating C++ in
Linux.

I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.
Just get yourself a some good books - say, Langer & Kreft for
iostreams, and Austern for the STL, and a copy of the ISO C++ 2003
standard.

The gnu libstdc++ docs are here:
http://gcc.gnu.org/onlinedocs/libstd...mentation.html . THe
most useful part of that is probably:
http://gcc.gnu.org/onlinedocs/libstd...4/modules.html

There are man pages for all this in a tarball at
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/ .
Just untar it whereever you want, add that dir to your man path,
and presto, man pages. Start with 'man C++Intro' . But there's no
man page for cout. IIRC, the philosophy behind the libstdc++ docs
is that the ISO C++ standard should be the documentation, and the
libstdc++ docs should document only what the standard does
not.

And sgi's docs (which g++ users have relied on forever) are here:
http://www.sgi.com/tech/stl/

But I have a hard time seeing how someone unfamiliar with what's in
good C++ texts could make much use of that documentation. You
aren't likely to get anywhere in C++ unless you spend a few
hundred dollars on books, and (much more importantly) a few
hundred hours studying those books, and applying the lessons in
them.

I have no problems finding my perl and c man documentation, and the C++
compiler is installed and works fine.

So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.
See above. I don't know if any linux distros provide them
pre-packaged.
Second, I realize that there are C++ extensions and OO libraries and so
on. In Perl, I would just visit CPAN for these things.

How and where do I browse the available library of contributed C++
libs?
boost.org is the closest thing c++ has to CPAN. But in all honesty, I
don't think any other language has anything quite as nice as
CPAN. (Nor does any other langauge have man pages as nice as
Perl's or C's.)

For example, I want to parse posix command line options, which in C I
would do with getopt_long. I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
to *find* these types of libraries?


boost.org - specifically, http://boost.org/doc/html/program_options.html
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #9
br**********@hotmail.com wrote:
As a Perl programmer for many years, this week I decided to stick my
toe back into C for a specific project.

During which I was tinkering with C++, which I have no production
experience in.

I am embarrased to say I am having soem difficulty navigating C++ in
Linux.

I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.

I have no problems finding my perl and c man documentation, and the C++
compiler is installed and works fine.

So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.

Second, I realize that there are C++ extensions and OO libraries and so
on. In Perl, I would just visit CPAN for these things.

How and where do I browse the available library of contributed C++
libs?

For example, I want to parse posix command line options, which in C I
would do with getopt_long. I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
to *find* these types of libraries?

You may check this page:

http://www23.brinkster.com/noicys/learningcpp.htm

--
Ioannis Vranos

http://www23.brinkster.com/noicys

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #10
pt*@lab.it.uc3m.es (Peter T. Breuer) writes:
In comp.os.linux.misc br**********@hotmail.com <br**********@hotmail.com> wrote:
I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.


There is no reason it should - that's part of C++.


Nonsense. 'fopen' is part of C, and yet, on any unix or linux system
I've used, 'man fopen' results in useful information.

'man' is the traditional documentation format on unix and linux, and
even today it is still preferred by many users. That's plenty of
reason for a C++ implentor to provide a man page for cout.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #11

mjt wrote:
("br**********@hotmail.com" <br**********@hotmail.com>) scribbled: ... probably best to visit the bookstore for
a reference on this. as you know, too, you
can use C functions using c++


I'll throw in a plug here for Herb Shildt's "C++: The Complete
Reference" ... It taught me the language. It reads more like a
reference manual than a textbook, so if you've already got a background
in programming, it's fairly convenient.

ISBN: 0072226803
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Jul 23 '05 #12
Mike Mol wrote:
I'll throw in a plug here for Herb Shildt's "C++: The Complete
Reference" ... It taught me the language. It reads more like a
reference manual than a textbook, so if you've already got a background
in programming, it's fairly convenient.

ISBN: 0072226803

http://www.accu.org/bookreviews/publ.../0sb/index.htm
You may check about his books.

--
Ioannis Vranos

http://www23.brinkster.com/noicys

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #13
In article <11**********************@o13g2000cwo.googlegroups .com>, Mike
Mol <mi*****@gmail.com> writes
I'll throw in a plug here for Herb Shildt's "C++: The Complete
Reference" ... It taught me the language. It reads more like a
reference manual than a textbook, so if you've already got a background
in programming, it's fairly convenient.


Not if you want technically correct information. He is wrong or confused
often enough so that no experienced C++ user would want to trust it.
For library details stick with The Standard C++ Library by Nico
Josuttis. If you want details of the language itself look them up in
'The C++ Programming Language' by Bjarne Stroustrup. No serious C++
programmer should be without those two books.
--
Francis Glassborow ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #14
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Llewelly <ll*********@xmission.dot.com> writes:
pt*@lab.it.uc3m.es (Peter T. Breuer) writes:
In comp.os.linux.misc br**********@hotmail.com <br**********@hotmail.com> wrote:
> I am pretty certain that I installed all the available documentation
> with my Suse 9.2 install, yet 'man cout' for example, yields no
> results.


There is no reason it should - that's part of C++.


Nonsense. 'fopen' is part of C, and yet, on any unix or linux system
I've used, 'man fopen' results in useful information.

'man' is the traditional documentation format on unix and linux, and
even today it is still preferred by many users. That's plenty of
reason for a C++ implentor to provide a man page for cout.


Since libstdc++ is documented with Doxygen, it could be made to spit
out troff rather than HTML (there's an option to enable it), but the
man pages are rather verbose and, unlike manpages, do not have related
functions/symbols grouped on a single page.
Regards,
Roger

- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFCLMSHVcFcaSW/uEgRAuFiAJ4+r8p4NZSN8vdx8EPN8XMyRGAqOQCgml02
XeXp7pdTFxUnuUWg61b84Uk=
=8CLX
-----END PGP SIGNATURE-----

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 23 '05 #15
br**********@hotmail.com wrote:
As a Perl programmer for many years, this week I decided to stick my
toe back into C for a specific project.

During which I was tinkering with C++, which I have no production
experience in.

I am embarrased to say I am having soem difficulty navigating C++ in
Linux.

I am pretty certain that I installed all the available documentation
with my Suse 9.2 install, yet 'man cout' for example, yields no
results.

I have no problems finding my perl and c man documentation, and the C++
compiler is installed and works fine.

So, my first problem is that I dont know where the man pages live for
C++, or where to get them if Im missing them.

Second, I realize that there are C++ extensions and OO libraries and so
on. In Perl, I would just visit CPAN for these things.

How and where do I browse the available library of contributed C++
libs?

For example, I want to parse posix command line options, which in C I
would do with getopt_long. I assume, however, that someone has already
written a nice OO C++ interface to command line options - where do I go
to *find* these types of libraries?


This has sure gotten to be a long thread. I run Red Hat Enterprise Linux,
and there is a lot of documentation to be obtained, starting at:

/usr/share/doc/rhel-gcc-en-3/index.html

that you can examine with a browser. I do not know where it is in SuSE,
but it might be there somewhere like that. Probably will not say rhel- in
it though.

One reason why functions like close(), open(), read() and write() have
manual pages is that there are kernel entries that support them almost
directly, so a manual page is appropriate.

Things like cout <<, cerr <<, etc., do not exist is that there are no
kernel entries for them; they are internal to the implimentation of C++
(and are almost certainly implimented by run-time library routines that
call close(), open(), etc.), so you will not find manual pages for them
any more than you would find manual pages for the DO and FORMAT statements
of a FORTRAN compiler.

In C++ you can access the IO routines like read(), write(), etc., if you
want to, but it is usually a mistake. I do find things like sprintf()
helpful, though.

I found the best documentation I use for C++ are in a few textbooks. To
begin, I like "C++ Primer" by Lippman and Lajoie (I have the Third
Edition) for most everything, and "The C++ Standard Library" by Josuttis.
Bjarne Stroustrup's book, "The C++ Programming Language" is good if you
need it, and Peggy Ellis and Bjarne Stroustrup's book, "The Annotated C++
Reference Manual" can be helpful. But I would not start with the last two.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 17:15:00 up 48 days, 1:32, 3 users, load average: 4.26, 4.19, 4.17
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Jul 23 '05 #16

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

Similar topics

17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
2
by: Daveyman | last post by:
Hi, I'm having a problem navigating to/from a subweb using forms authentication. The setup in IIS is as follows: TestSite +----SecureDir +----ReportsSubWeb In VS.Net 2003 this has been...
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
1
by: ABC | last post by:
Can I find out when the user is navigating to another page? or What events will be call if the page is change to another page? I want to call clear session variables when user is navigating to...
7
by: hiriumi | last post by:
Hello folks, I have a web application that has basic authentication turned on (IIS). What I would like to accomplish is detect whether user is navigating away from the site or simply going to the...
0
by: tanaji | last post by:
I am writing a web application. In that application I have to need reading data from server during each refresh by using sql query. Refresh time is 10 seconds. BAckend is SQL Server 2000 and frontend...
1
by: JohnMOsborn | last post by:
I am designing an Access database that will use tab controls. Normally, you place different sets of fields on each page of the tab control – like Fields1-3 on Page 1, Fields 4-6 on Page 2, etc. In...
0
by: in10se | last post by:
I have a .NET 2.0 application that uses the WebBrowser control. Because all of my pages are generated dynamically, I am catching the Navigating event, cancelling it, and performing my own operations...
0
by: Anthony Peterson | last post by:
I'm trying to find a solution for my webpage which uses a Datagrid of all editable rows for a spreadsheet sort of style. The tab key works great in navigating across this datagrid, but I would like...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.