Learning C++

H

Harold A. Climer

A friend of mine is moving to California and did not want to move all
his library. He gave me quite a few books on programming using
different computer languages. BASIC,PASCAL, C,C++, etc.
I have had some experience programming in TRUEBASIC.
I would like to learn to program using C or C++.( Not professionally I
am too old for that)
What software do I need?(Something inexpensive) I have two computers.
The one at work is running Vista Home SP1 and the one at home is
running Windows XP MCE SP3.
I have seen some C++ stuff by Borland and Microsoft. I really do not
need the latest software,but I would like to be able for it to work
properly on XP and Vista.
Harold A Climer
Dept. Of Physics Geology, and Astronomy
U.T, Chattanooga
Rm. 406A Engineering, Math & Computer Science Building
615 McCallie Ave. Chattanooga TN 37403
(e-mail address removed)
 
E

err_

A friend of mine is moving to California and did not want to move all
his library. He gave me quite a few books on  programming using
different computer languages. BASIC,PASCAL, C,C++, etc.
I have had some experience programming in TRUEBASIC.
I would like to learn to program using C or C++.( Not professionally I
am too old for that)
What software do I need?(Something inexpensive) I have two computers.
The one at work is running Vista Home SP1 and the one at home is
running Windows XP MCE SP3.
I have seen some C++ stuff by Borland and Microsoft. I really do not
need the latest software,but I would like to be able for it to work
properly on XP and Vista.
Harold A Climer
Dept. Of Physics Geology, and Astronomy
U.T, Chattanooga
Rm. 406A Engineering, Math & Computer Science Building
615 McCallie Ave. Chattanooga TN 37403
(e-mail address removed)

If you're going to be doing all of your development on Windows, grab
this:

http://www.microsoft.com/Express/VC/

It doesn't cost anything, though you need to jump through some fairly
painless license key hoops. The IDE has a really nice debugger and
some code refactoring tools and other helpful stuff (you could get
similar on linux with netbeans / eclipse).

I have to say, c++ development on debian or ubuntu linux is really
worth looking into. Setting up your development environment is a
breeze, and the whole system feels like it's built for development.
You can run linux alongside Windows on one machine using Sun's
VirtualBox (also free) if you don't feel like doing a hard OS install.

-- Nick
 
D

dragan

Harold said:
A friend of mine is moving to California and did not want to move all
his library.

Wow, I CAN relate!! And who is he that KNOWS C++ cannot?! An appropriate
post for the season (if there is season for such) "lament"?. I will pose the
question as a separate thread.
He gave me quite a few books on programming using
different computer languages. BASIC,PASCAL, C,C++, etc.
I have had some experience programming in TRUEBASIC.
I would like to learn to program using C or C++.( Not professionally I
am too old for that)

That is relevant, more than you think maybe.
What software do I need?(Something inexpensive)

You need: inquisitiveness, desire, drive (a purpose? an alterior
motive?).... The software is pretty much irrelevant. Though I can recommend
the MS free compilers (at least the behemoths gave SOMEthing back!).
I have two computers.
The one at work is running Vista Home SP1 and the one at home is
running Windows XP MCE SP3.
I have seen some C++ stuff by Borland and Microsoft. I really do not
need the latest software,but I would like to be able for it to work
properly on XP and Vista.

You should focus on building something first, before you get into deployment
scenarios. That is, unless you wanna try the way the way of General Moters.
Harold A Climer
Dept. Of Physics Geology, and Astronomy

Your ignorance and lack of research on the matter makes me question whether
you are a TROLL. Read: I don't believe you!
 
N

nick

Borland, on this particular subject, is practically dead, monopolized out of
existence, by MSFT.

Poor Borland. They sold their entire line of development tools last
year, but apparently some of the software is still going to see new
development. I doubt this gets much serious use these days.
www.embarcadero.com/products/cbuilder
Somewhere on MSFT's web site you should find a free download of Visual
Studio Express, or something named along those lines. That'll suffice for
beginners. I don't know if MSFT updated their freeware for Vista, but it'll
definitely work on XP.

The newer releases work with post-XP Windows editions. The debugger
and code completion are excellent, great for beginners. Be prepared
for some registration key nonsense though. www.microsoft.com/Express/VC/
Full development tools from MSFT are pricy, since developers are a revenue
source for MSFT. However, given that you're @.edu, you should be able to
easily get a rather steep educational discount for the full Visual Studio
kit. MSFT wants mindshare from young skulls full of mush, so they shove
their wares into .edus for peanuts.

The Express Edition should be more than adequate for casual use,
though... You probably won't need to bother with anything more.

The only alternative to the Microsoft toolchain that really gets any
use on Windows as far as I know is MinGW (Windows port of gcc, the
standard-issue gnu/linux compiler). It might be worth trying as well,
but I'm willing to bet it's a bit more trouble to get set up.

-- Nick
 
O

osmium

nick said:
The only alternative to the Microsoft toolchain that really gets any
use on Windows as far as I know is MinGW (Windows port of gcc, the
standard-issue gnu/linux compiler). It might be worth trying as well,
but I'm willing to bet it's a bit more trouble to get set up.

MinGW is about as easy to set up as anything you are likely to see, it is
what I use. I am not in love with the debugger or the documentation and
there is no Usenet newsgroup. Why use it? I have had some traumatic
experiences with Microsoft products and avoid them when possible, 'nuff
said. Since you and I are both guessing, my guess is that the VC footprint
is huge compared to MinGW. I tried to install a version of VC once and it
bombed during the process, I said screw it, and never looked back.
 
H

Harold A. Climer

Wow, I CAN relate!! And who is he that KNOWS C++ cannot?! An appropriate
post for the season (if there is season for such) "lament"?. I will pose the
question as a separate thread.


That is relevant, more than you think maybe.


You need: inquisitiveness, desire, drive (a purpose? an alterior
motive?).... The software is pretty much irrelevant. Though I can recommend
the MS free compilers (at least the behemoths gave SOMEthing back!).


You should focus on building something first, before you get into deployment
scenarios. That is, unless you wanna try the way the way of General Moters.


Your ignorance and lack of research on the matter makes me question whether
you are a TROLL. Read: I don't believe you!
DROP DEAD
 
R

Ron AF Greve

Hi,

Microsoft visual C++ express edition is a free download from :

http://www.microsoft.com/express/

You might also want to download the MSDN docs.


| A friend of mine is moving to California and did not want to move all
| his library. He gave me quite a few books on programming using
| different computer languages. BASIC,PASCAL, C,C++, etc.
| I have had some experience programming in TRUEBASIC.
| I would like to learn to program using C or C++.( Not professionally I
| am too old for that)
| What software do I need?(Something inexpensive) I have two computers.
| The one at work is running Vista Home SP1 and the one at home is
| running Windows XP MCE SP3.
| I have seen some C++ stuff by Borland and Microsoft. I really do not
| need the latest software,but I would like to be able for it to work
| properly on XP and Vista.
| Harold A Climer
| Dept. Of Physics Geology, and Astronomy
| U.T, Chattanooga
| Rm. 406A Engineering, Math & Computer Science Building
| 615 McCallie Ave. Chattanooga TN 37403
| (e-mail address removed)
 
B

BGB / cr88192

osmium said:
MinGW is about as easy to set up as anything you are likely to see, it is
what I use. I am not in love with the debugger or the documentation and
there is no Usenet newsgroup. Why use it? I have had some traumatic
experiences with Microsoft products and avoid them when possible, 'nuff
said. Since you and I are both guessing, my guess is that the VC
footprint is huge compared to MinGW. I tried to install a version of VC
once and it bombed during the process, I said screw it, and never looked
back.

yeah, MinGW has a few of its own little issues, but tends to be easier to
set up than getting all of MS's free stuff to play well together...

then again, I tend to use a kind of "oddball" setup for MSVC, where I
generally use MSVC (via the Windows SDK) in conjunction with some of the
tools from Cygwin (mostly GNU make).

added fiddling is needed to plug together the Windows SDK and DirectX SDK.
one would think MS would make them "auto-plug", but apparently not (unless
maybe one has to install them in a certain order?...).

then in this custom setup, I also ended up using WinDbg and AMD CodeAnalyst,
....


dunno about Visual Studio, not really used it much and not really sure what
it really has to offer (or, at least, what it could offer that would be
worth trying to get an approx 600 kloc project loaded into a VS project
file...).

....
 
M

Michael Tsang

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have seen some C++ stuff by Borland and Microsoft. I really do not
need the latest software,but I would like to be able for it to work
properly on XP and Vista.

I use tools from GNU (g++) but g++ for 64-bit Windows is not ready for
production yet (it is in B stage). You may consider Microsoft tools for 64-
bit Windows (Borland is nearly dead). Grab a copy of MSVC Express 2010 (or
2008 if you don't need to use C++0x) from Microsoft website. (but I admit:
Microsoft tools are too heavy-weighted. It takes hours for me to install
MSVC Express 2010 on a Windows 7 machine. It only takes seconds for me to
install a complete set of GNU toolchain (build-essential) on Ubuntu)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAktANBsACgkQG6NzcAXitM/sUACgku4P8JQ9gM4W8tkAT5/Hi70I
U3gAn30pNdvCAHygA0KSpKwvk8Lgbhvg
=Ch3A
-----END PGP SIGNATURE-----
 
R

red floyd

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I use tools from GNU (g++) but g++ for 64-bit Windows is not ready for
production yet (it is in B stage). You may consider Microsoft tools for 64-
bit Windows (Borland is nearly dead). Grab a copy of MSVC Express 2010 (or
2008 if you don't need to use C++0x) from Microsoft website. (but I admit:
Microsoft tools are too heavy-weighted. It takes hours for me to install
MSVC Express 2010 on a Windows 7 machine. It only takes seconds for me to
install a complete set of GNU toolchain (build-essential) on Ubuntu)

For XP and Vista, I'd probably agree. The MinGW chain may not be fully
64-bit ready.

Warning, if you do choose VS2008 Express, when you build projects, do
the following:

1. MAKE SURE YOU SELECT NATIVE CODE, NOT MANAGED!!!!! MS's "Managed"
code is something other than ISO Standard C++.
2. Start with empty console projects. Do not use a wizard, other than
to create an empty console project. This will allow you to start
learning ISO C++ as opposed to MFC, ATL, or .NET.

Once you are comfortable and familiar with Standard C++, you can then
try one of the frameworks for GUI apps (again, I wouldn't recommend
..NET, as it uses MS specific extensions to the language).
 
J

Jorgen Grahn

A friend of mine is moving to California and did not want to move all
his library. He gave me quite a few books on programming using
different computer languages. BASIC,PASCAL, C,C++, etc.
I have had some experience programming in TRUEBASIC.
I would like to learn to program using C or C++.( Not professionally I
am too old for that)

What C++ books were those? The other languages you mention (BASIC and
Pascal) make me think the collection is from the late 1980s. You will
not learn decent C++ from them; the language and its users have
improved so much since.

BR,
/Jorgen
 
J

James Kanze

[...]
Warning, if you do choose VS2008 Express, when you build projects, do
the following:
1. MAKE SURE YOU SELECT NATIVE CODE, NOT MANAGED!!!!! MS's "Managed"
code is something other than ISO Standard C++.

Isn't this the default. (I've used VS 2008, or at least, the
compiler in VS 2008, and I've never had managed C++. And as far
as I know, I've not done anything particular.)
2. Start with empty console projects. Do not use a wizard, other than
to create an empty console project. This will allow you to start
learning ISO C++ as opposed to MFC, ATL, or .NET.

Regardless of where you get the compiler from, start by using a
decent editor and a simple makefile, and don't hassle all the
extra complexities of the IDE. It only makes life more
difficult and introduces additional complexities.
 
B

Balog Pal

Regardless of where you get the compiler from, start by using a
decent editor and a simple makefile, and don't hassle all the
extra complexities of the IDE. It only makes life more
difficult and introduces additional complexities.

Should we also drop using matches and gas lighters and restrict to "natural"
methods of creating fire?

Makefile is certainnly easy to whoever already learned to use it, and does
so for a decade. For novices it just sucks. Especially compared to an IDE
with a project manager -- there all the supposed complexity is using "add
new" menu adding a new item and "add existing" otherwise...

For the other part -- if the aim of learning C++ is not an abstract one, but
to create some useful stuff, starting with an app framework that fits that
aim may be a good idea too. It has a fair amount of dangers, but so does
going barefoot for too long.
 
A

Alf P. Steinbach

* Balog Pal:
Should we also drop using matches and gas lighters and restrict to
"natural" methods of creating fire?

Makefile is certainnly easy to whoever already learned to use it, and
does so for a decade. For novices it just sucks. Especially compared to
an IDE with a project manager -- there all the supposed complexity is
using "add new" menu adding a new item and "add existing" otherwise...

Well I've had a lot of feedback on this topic from students. And although that
was more than ten years ago, they all agreed uniformly that after learning the
command line that was what they generally preferred. The situation with
professional development is different, because it's often much larger scale.

For the other part -- if the aim of learning C++ is not an abstract one,
but to create some useful stuff, starting with an app framework that
fits that aim may be a good idea too. It has a fair amount of
dangers, but so does going barefoot for too long.

I'm now pretty sure that for most people C++ can only be suitable as a first
language in a very supportive environment, essentially, in school.

I think that a person who has sufficient knowledge of programming to learn C++
on his/her own, will not have a problem with going barefoot. :)


Cheers,

- Alf
 
B

Balog Pal

Alf P. Steinbach said:
Well I've had a lot of feedback on this topic from students. And although
that was more than ten years ago, they all agreed uniformly that after
learning the command line that was what they generally preferred. The
situation with professional development is different, because it's often
much larger scale.

I don't have feedback from students, only see what people that practice do
around. My experience is pretty sour -- I heard too many claims on how
command line, make, (vim, etc) development is good, and how much and IDE is
just distracton. The I found their work pretty inefficient, doing extreme
amount of "fiddling".

(OTOH certainly an IDE will not make anyone smart or able, and I saw
inefficient work in IDE too...)
I'm now pretty sure that for most people C++ can only be suitable as a
first language in a very supportive environment, essentially, in school.

I think that a person who has sufficient knowledge of programming to learn
C++ on his/her own, will not have a problem with going barefoot. :)

You mean a theoretic or a practical problem? ;-))

For example I have no problem wit *ability* to go barefoot. But I absolutely
refuse to do so unless there is a very good reason. Guess some people think
it is sexy or romantic -- just as many programmers inclined to recreate the
wheel instead of use a stock one -- to me that is just excess pain without
gain.

The argument is noce, how about using it the other way around, having a
person bright enough to use C++ well shall we realisticly expect him getting
lost in a *good* IDE? ( my roll of good IDE's include Borland C++ 3.1
(and some earlier) and Visual C++/Studio, all versions I used... )


The usual suggestion goes as to learn command line first -- use IDE only
after mastering that to see behind, I am still skeptic about it.

An IDE leaves way more time to real issues in learning and jump-start to see
something "work", also straightforward way to edit/compile/fix/experiment.

The learning examples are okay with a single translation unit for long, and
with a couple of sources located in a small directory tree for whatever.

Without a need for custom build steps, extra generators, etc -- anything
that would overload the simplest project manager. Which at least handles
the dependances, correctly, without any black magic.
 
R

red floyd

* Balog Pal:

Well I've had a lot of feedback on this topic from students. And
although that was more than ten years ago, they all agreed uniformly
that after learning the command line that was what they generally
preferred. The situation with professional development is different,
because it's often much larger scale.

Honestly, for professional development, I prefer makefiles to IDEs,
simply because I have complete control -- I'm not constrained by what
the IDE (*cough*VS*cough*) thinks is a legit way of building stuff.
 
I

Ian Collins

Andy said:
I beg to differ. But you have looked at MSBuild?

A lot of us don't use windows. While there are good cross platform
IDEs, they are fine for green field hosted development but they don't
support cross-compiling for non-native targets.

When a project mixes code from different sources (open source libraries
for example), makefiles are usually the best, if not only, option.
Every project I work on has a mix of local and open source code, so the
build system has to cope with both. There's so much open source code
out there, the sooner a developer gets to know how to build form the
command line, the better.
 
J

Jorgen Grahn

I don't have feedback from students, only see what people that practice do
around. My experience is pretty sour -- I heard too many claims on how
command line, make, (vim, etc) development is good, and how much and IDE is
just distracton. The I found their work pretty inefficient, doing extreme
amount of "fiddling".

What kind of fiddling was that? I use Emacs, Make, version control
and the Unix shell are my usual tools, so I have a hard time imagining
what those inefficiencies were.

The Makefile can be an issue if you don't understand that it needs
to capture all dependencies (i.e. you have to have autogeneration
for them, using something like makedepend), or that you can rely on
the default *.cpp -> *.o rules. Once you have seen a decent
Makefile *once*, the problem is gone.

There are various kinds of pressures at my workplace to use Eclipse
For Everything, so I genuinely want to know what, if anything, I'm
missing. Most things I've seen so far have been functions I already
have and use, only here they are wrapped in a clumpsy GUI.
You mean a theoretic or a practical problem? ;-))

For example I have no problem wit *ability* to go barefoot. But I absolutely
refuse to do so unless there is a very good reason. Guess some people think
it is sexy or romantic -- just as many programmers inclined to recreate the
wheel instead of use a stock one -- to me that is just excess pain without
gain.

On Windows with its weak command-line and lack of tools, that seems
likely to be true, but the Unix development environment I mentioned
above doesn't feel very "barefoot" or manual to me.

/Jorgen
 
B

Balog Pal

Jorgen Grahn said:
What kind of fiddling was that? I use Emacs, Make, version control
and the Unix shell are my usual tools, so I have a hard time imagining
what those inefficiencies were.

In my terminology emacs is an IDE by most practical means...

"fiddling" I mean extra time/effort spent on loading, reloading sources, go
to desired locations (say where the compile error is), to watch related
code, etc. Also related documentation.
During all the usual cases -- primary code writing, review, raw-compile,
debug...
The Makefile can be an issue if you don't understand that it needs
to capture all dependencies (i.e. you have to have autogeneration
for them, using something like makedepend), or that you can rely on
the default *.cpp -> *.o rules. Once you have seen a decent
Makefile *once*, the problem is gone.

Pobably so -- but the alternative is to not have the whole problem set at
all.

What btw is pretty shocking. I recall Borland 3.x' exported makefile had
just the list of .c sources, and .AUTODEPEND up front -- the dependencies
were compiled into .obj and make itself read them, if the file was present.
20 years ago. Then in today's sytems I still see the need for separete .d
outputs and cryptic rules to make them picked up? It is crazy.
There are various kinds of pressures at my workplace to use Eclipse
For Everything, so I genuinely want to know what, if anything, I'm
missing. Most things I've seen so far have been functions I already
have and use, only here they are wrapped in a clumpsy GUI.

I don;t have any personal experience with Eclipse, have one friend who likes
it all the way, and saw many comments on forums that say it is nuts and very
counter-intuitive.
On Windows with its weak command-line and lack of tools, that seems
likely to be true, but the Unix development environment I mentioned
above doesn't feel very "barefoot" or manual to me.

Just like you have a selection of shells on unix, you can do the same on
windows. And certainly all the unix "tools" are available.

Just appear much less needed.

There was a good joke about ATM with unix interface. ;-) Unfortunately the
keywords are not google-friendly, but I'm sure you can imagine it.

And the point is, that if you can carry out what you want with a single
keypress or click (sometimes with 2, other times with 0) why use more? Why
re-type the info before you (or paste it) if avoidable?

You know, 2 decades ago, when Windows (3.0) started to enter the picture
(and some other shells on DOS), I was a very loud fan of command line and
similar tools. the archives have my posts about how much faster I can do
anything by typing (or selection) than by fiddling with the mouse. And
that was the case too.

Thoug then the filenames were 8.3 and we didn't have too much of them (a 40
Mb disk was quite huge).

But eventually the picture changed -- on one hand the interface improved
drasticly with context menus, on the other the amount of information grew,
and working with text-based proggies became increasingly suboptimal.
 
J

James Kanze

Should we also drop using matches and gas lighters and
restrict to "natural" methods of creating fire?
Irrelevant.

Makefile is certainnly easy to whoever already learned to use
it, and does so for a decade. For novices it just sucks.
Especially compared to an IDE with a project manager -- there
all the supposed complexity is using "add new" menu adding a
new item and "add existing" otherwise...

Makefiles are certainly something additional that you have to
learn. And they shouldn't be necessary for a beginner. I used
to believe that IDE's were a good thing for beginners, because
they allowed deferring the learning of makefiles and such---one
thing at a time. For the last couple of months, however, I've
had to work under an IDE, and I now realize that they represent
even more complexity than make. So until someone comes out with
something better, we're stuck with make as the simplest
solution: the easiest to learn and use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top