C ++ learning resources ?

  • Thread starter COSTAR_
  • 10 comments
  • 847 views
Could anyone point me to some books or other resources online or otherwise, for learning C++ ?
I've found some resources from doing searches, some even claim to be for the "beginner" but I am finding them impractical, some are lacking exercises to test your skill and others are too complex- expecting you to write programs as if you were 6 months into learning .. I'd appreciate it if anyone could help, Thanks.
 
I don't know, but I'd say go to a bookstore and look at the books they have. Maybe you'd want to start out learning the principes of programming in another language because C is hard to start with. Once you get the basics of programming in... say... Visual Basic, you could try to understand C. Sure, you'll need to switch to a different syntax, but that isn't too hard. Visual Basic is great to quickly be able to get some results. With C or java you can be tinkering with code for hours and still not be able to see any results, which makes it harder to learn actual programming.
 
I wish schools wouldn't teach Visual Basic before C. Many features that are in object oriented languages like C and Java are not in Visual Basic. You're learning on a crippled language. The biggest problem with Visual Basic IMO, is that it only runs on Windows. So much for coding for that awesome new game for PS2...

I know VB looks easy on the outside, but you will wish you were in an object oriented language when you start compiling real programs, not your Hello World mess.

If you're like me, you hate reading, so I don't have recommendations for books. The way I learned was going to C websites and looking at other user's code. You will see how professionals code and how they structure their programs. No book will tell you that.
 
Do you intend on using C++ or C++.NET?

If you're going to use the .NET framework, Microsoft's MSDN libraries can be extremely helpful. They contain a bunch of code examples and such for everything for VB.NET to C# and so on. When I was completely new to VB.NET I tried writing an MP3 player as my first project (none of that hello world crap). With plenty of Google searches and MSDN reference, I was able to come up with a pretty awesome Winamp-esque player.
 
Thanks for the suggestions thus far, unfortunately, the only thing I have come across has been that "hello world crap" as you put it ..

I am "green" when it comes to programming, the only thing I have right now is MS's Visual C++ toolkit, since they've offered its compiler free ...

As for C++ or .NET, I thought C++ itself would not be specific to just MS environments ?

True too, I am not a huge fan of reading, I often fall asleep reading the text from some of these online "books" on C++ ... about like I do equipping parts to cars in GT4 ^_~

The latest "book" I've found somewhat bombarded me w\ functions,real variables/literal reals,strings,operators,expressions, integers, doubles, long/short, characters,reserved words and identifiers as well as decimal,hex,binary digits, memory addresses ETC... This was in just the 1rst of 13 chapters, it used varying examples of pay rate, weekly salaries and the like in programs, to demonstrate much of the things I mentioned above ..

The first exercise then told me to write a program for a farenheit and celsius conversion result using this formula

(degree) C=5/9((degree)) F-32)

Keeping in mind that my first program was "hello world" :lol:

The odd thing is, it seems that there are more "formats"? or is that different environments? than one expects, I tried using some of the code in his example w\ the Visual C++ compiler and it caused errors, it seems that he was using a different compiler ?...

Mine expects
#include <iostream>
using namespace std;


his example:
# include <iostream.h>


I'm still determined to learn, I can say I know more than I did before, just not as much as I need .. Does anyone else have any links to some good, straightforward C++ learning resources for the beginner, hopefully w\ practical exercises ?
 
Viper Zero
I wish schools wouldn't teach Visual Basic before C. Many features that are in object oriented languages like C and Java are not in Visual Basic. You're learning on a crippled language. The biggest problem with Visual Basic IMO, is that it only runs on Windows. So much for coding for that awesome new game for PS2...

I know VB looks easy on the outside, but you will wish you were in an object oriented language when you start compiling real programs, not your Hello World mess.

If you're like me, you hate reading, so I don't have recommendations for books. The way I learned was going to C websites and looking at other user's code. You will see how professionals code and how they structure their programs. No book will tell you that.

VB makes it possible not to work with objects, but it is very well possible to work with objects. I started with a year of VB in university and the next year we moved onto java (after that year I didn't program anymore, so I'm not good at it, but I understand the basics). Anyway, I believe it would have been a lot harder for me if I would have started with java. VB was a good way to start understanding the basics of programming.

It isn't something you should stick to if you have ambitions to make large programs, that's right, and often a program will work on one machine but not on the other, even if both run windows. Also VB allows you to make very sloppy code and it still works, so you have to be very critical of yourself while working with it. You have to keep that in mind.
 
ok ss, I remembered reading something about questions of whether someone should start w\ C++ instead of say C, as if C would be easier for beginning, however the person also mentioned that the way C & C++ work, meant I would have to unlearn some of the things from C because there are differences, that it would be better to go right on to C++ ..

I've also read some things about assembly language, I've read its the most basic, that is, its like the "foundation" that just about anything can be programmed using "assembly", but that it was supposedly harder/ more time consuming ..

I know I keep going on about this programming issue, as I understand that probably the best way to learn would be through an instructed course but that requires more $$ and time than I'm able to committ to at this time ..

Could you or someone answer me this, how practical is the C++ programming language ? With what you've said, it doesnt seem very practical if the programs written are so specific, how could I expect to write programs to share freely or market if they might be specific to my own system ?

What language(s) are programs written in that we use almost universally, that is, at the least, its specific only to an operating system rather than your own PC ?
 
COSTAR_
ok ss, I remembered reading something about questions of whether someone should start w\ C++ instead of say C, as if C would be easier for beginning, however the person also mentioned that the way C & C++ work, meant I would have to unlearn some of the things from C because there are differences, that it would be better to go right on to C++ ..

C is quite a "free" language. That is, you can do a lot of things which are damaging or will lead to incorrect results in C that you can't (easily) do in a language like C++ or Java. Things like stomping all over the memory allocated for another process, running off the end of an array. Depending on which compiler you use, (and what flags) you might get warnings about your code, but the code will still be compiled. As we used to say last year, you'd write an incorrect program, but the compiler would just say something like "Your aeroplane has no wings or engines, but here's the keys anyway". If I were you I'd start off by learning C++ or Java. At uni we started with Java, and even though I'd never programmed before, I found it pretty easy to pick up.

COSTAR_
I've also read some things about assembly language, I've read its the most basic, that is, its like the "foundation" that just about anything can be programmed using "assembly", but that it was supposedly harder/ more time consuming ..

Don't start off programming in assembly. It's really not worth the time. The only time assembly is used in common programming these days is when it's absolutely necessary. For example, a portion of code in an OS that's going to be run very frequently or a part of a game that's under-performing when written in a high-level language.

COSTAR_
Could you or someone answer me this, how practical is the C++ programming language ? With what you've said, it doesnt seem very practical if the programs written are so specific, how could I expect to write programs to share freely or market if they might be specific to my own system ?

C++ is a very common language indeed. Windows and Linux are written mainly in C/C++, and most applications and system programs you're running will be written in C/C++. That media player you're using, your browser, those instant messengers etc will basically all be written in C/C++.

If you write and compile a program on your windows machine, it should run on all other windows machines. The program won't be just restricted to your machine. That's why when you download a program from the internet or get one from a CD, it appears as the *.exe file (i.e. the compiled file). If the files were specific to just your PC, you'd have to get the source code for every program and compile it yourself.

COSTAR_
What language(s) are programs written in that we use almost universally, that is, at the least, its specific only to an operating system rather than your own PC ?

C/C++ is the most common language in use today. If you compile a program in C/C++ for your windows machine, it should work on all other windows machines. It will not, however, work on a Unix machine. However, if you compile a Java program on a windows machine, it should work on a Unix machine. The reason for this is that Java "compiling" actually only turns the source into bytecode, which is then interpreted by the Java Virtual Machine. The bytecode is non-OS specific (though there are some examples of code which can be written on one OS which won't work on other OSs, but in general they will).
 
First of all, Thanks to all of you :) that has offered something in response to my questions and Thank You very much amp for going abit indepth to give me a clearer understanding of C/ C++, you seem like just the person to ask if I have more questions or need some help, Thanks so much :)
 
COSTAR_
First of all, Thanks to all of you :) that has offered something in response to my questions and Thank You very much amp for going abit indepth to give me a clearer understanding of C/ C++, you seem like just the person to ask if I have more questions or need some help, Thanks so much :)

You're welcome :)

However, I'm probably not the best person to ask.

I've only done 2 years of Java and half a year of C, so I've not really got as much experience as probably some of the other people here will have.

I can give it a shot if you have any questions, but I can't promise anything ;)
 
Back