Baby steps in C++

Da'iMacDaddy

Unix Newb.
Hey guys when I bought OS X I went ahead and installed the developers tools. I had already had a years worth of C++ in high school (I never really paid attention though) and I wanted to learn it again. Now I can't figure out how to get a string of characters instead of just one (with char) like I would want the program to give the name of one candidate and I want his whole name not just the first letter in his name.

Well any help would be appreciated!

Thanx
 
I'd suggest that you check out a few books on the subject. Deitel & Deitel has at least one good book (and CD, if you have access to a PC). O'Reilly has come on board with Learning Carbon, and there are some good Mac specific programming materials available also. Lots of good tutuorials on the web as well...

Something that helped me was taking a class (in Perl), which has given me more interest to read the books I have now. Much of the learning material is dry reading, but it's still good to stick with it. Having a project in mind is definately a good start.
 
If you know when you're writing the program what the string is, you can do something like
Code:
char *myName = "Bob Newhart";
Otherwise, grab a C++ book and read the chapter on IOStreams. You can probably find lots of stuff by searching the web, too.

Take this with a grain of salt, by the way. I've been living in Cocoa and nasty-ass Fortran lately, so my C++ is a little rusty.
 
Back
Top