If onlyMS had a C++ getting started site

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

So now that I graduated to object oriented programming C#, and I'd like to
try C++ but I can't find anything that gets me an understanding of some
aspects of the language/compiler.

Like what is the meaning of the single underscores? How did the include
files cdef and others get their name? So confusing.

Also what is the meaning of a "template"? Is that something with < and >?
Generics in C# are not too hard to grasp, so I figure templates are next on
my things to learn but I can't find a site that can explain this to me.

Any help would be appreciated.
 
try www.codeproject.com
it has lots of good articles on all kinds of technology, including C++.

templates are what the name literally says. you implement a class that is of
template type T.
you then code your class using types of T internally and in the parameter
lists as if they were real types.
during compilation the compiler then creates an instance of your class,
replacing T with the type you specified. it is only then that the compiler
can know if what you supplied for type will compile or not.

if you are new to C++ i give your the advice to buy scott meyers his books:
'effective C++' and 'more effective C++'.
stroustrub s book 'the C++ programming language' is also good, but can be
dense to read through.

kind regards,
Bruno.
 
just remembered:
single underscores indicate microsoft specific extensions to the standard.
there are lots of them in the string handling runtime functions.

double underscores followed by a capital letter are reserved for internal
usage. if you look inside the sdt headers, they use this naming comvention.

kind regards,
Bruno.
 
Scottie_do said:
So now that I graduated to object oriented programming C#, and I'd like to
try C++ but I can't find anything that gets me an understanding of some
aspects of the language/compiler.

Like what is the meaning of the single underscores? How did the include
files cdef and others get their name? So confusing.

Also what is the meaning of a "template"? Is that something with < and >?
Generics in C# are not too hard to grasp, so I figure templates are next on
my things to learn but I can't find a site that can explain this to me.

Any help would be appreciated.

I was in the same position as you were a few months ago. I understood
C# well but knew nothing of C++ and wanted to learn. I bought
Stroustrup's book "The C++ Programming Language" and that answered all
my questions like "What's a template?" (yours) and lots of others. It's
the only computer book I've ever bought and it was worth it.

Scott
 
Back
Top