Learning C/C++ code

Recommended Videos

halflobster

New member
Sep 1, 2008
80
0
0
I'm 16 and broke but I want to learn how to code in C/C++ does anyone know any websites that might help me with this.
I currently use Dev-C++ as my compiler. I know some basics but i cant find any in-depth information on it. I dont have alot of experiance but i know how to make a "hello World"
and a countdown.
 

Lord Thodin

New member
Jul 1, 2009
1,218
0
0
Ive got a similar problem. I want to learn to code but cant find any trustworthy sites to teach me. They are all "Click here to download." And before i do i check the rest of the site, and its got porn advertisements out the yin yang.
 

crepesack

New member
May 20, 2008
1,189
0
0
There are alot of books out there on C++ Those are probably your best bet. Your central library
should have a HUGE arrangement of books and even CD's related to C. I don't have this problem mainly because my father is a Computer Programmer/Electrical Engineer and has literally a personal library of books. But aside from programs deep knowledge comes from those 1400 page texts. Amazon is actually a cheap place to get em if you want to own the book.
 

reaper_2k9

Keeper of the Beer
Oct 22, 2008
493
0
0
Just search around the internet there a lot of good resources out there to get you started. A guy I work with has been programming since he was 8 so just start playing around with it, the best way to learn it is by messing up.
 

Ushario

New member
Mar 6, 2009
552
0
0
[link]http://www.gamedev.net/reference/list.asp?categoryid=20#214[/link]

Gavedev.net isn't really about teaching the basics of programming but there are some useful resources on that page. The book link right at the bottom of the page sounds promising. I've been learning how to program through a course so I haven't had to look into online information as much.

I haven't used the Dev-C++ compiler before and generally speaking tutorials for C++ will assume that you are using Visual Studio 2008. Any particular reason you are using Dev-C++?
 

halflobster

New member
Sep 1, 2008
80
0
0
ive tried visual studios and it frustrated me a bit so i tried other compilers and dev has worked the best for me
Ushario said:
[link]http://www.gamedev.net/reference/list.asp?categoryid=20#214[/link]

Gavedev.net isn't really about teaching the basics of programming but there are some useful resources on that page. The book link right at the bottom of the page sounds promising. I've been learning how to program through a course so I haven't had to look into online information as much.

I haven't used the Dev-C++ compiler before and generally speaking tutorials for C++ will assume that you are using Visual Studio 2008. Any particular reason you are using Dev-C++?
ive tried visual studios and it frustrated me a bit so i tried other compilers and dev has worked the best for me. also thanks for the website.
 

Oolinthu

New member
Apr 29, 2009
100
0
0
halflobster said:
I'm 16 and broke but I want to learn how to code in C/C++ does anyone know any websites that might help me with this.
I currently use Dev-C++ as my compiler. I know some basics but i cant find any in-depth information on it.
http://www.learncpp.com/

A brief perusal of this site, and it seems legit, and relatively in-depth. Hell, I might use it to reacquaint myself with the language. How much programming experience do you have?

Google is your friend, by the way. This was literally the first hit searching "learn c++"
 

Cixelsid

New member
Jun 25, 2009
42
0
0
halflobster said:
I'm 16 and broke but I want to learn how to code in C/C++ does anyone know any websites that might help me with this.
I currently use Dev-C++ as my compiler. I know some basics but i cant find any in-depth information on it.
Are you learning from scratch or do you have some programming background? If you've got no programming background then I'd suggest you start out with something easier, like Pascal, Delphi, C# or Java. But first learn the basics of imperative languages before moving on to the object oriented languages (C#, Java, C++, Smalltalk et al).

C is not typesafe and it does little to no checks on pointer boundaries, meaning you can write to your stack and heap space willy nilly. C++ is a bit better but you need to follow the rules, a lot of its unwritten and at times they are confusing unless you understand how the compiler works and how its memory model works.

Bjarne Stroustrup, creator of C++ said this:
"C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, it blows away your whole leg."

That is exactly it, C is so powerful because it doesn't ask any questions and doesn't hold your hand. You ask "I want to shoot off my bigtoe." It will answer, "Sure, no problem".

I've been writing C++ for 10 years or so and it still manages to spring a surprise on me every now and again. If you've got some programming background and you're just interested in asking a few question regarding C++ then the C++ FAQ Lite [http://www.parashift.com/c++-faq-lite/index.html] is a pretty good site. If you're looking for a book for C++ beginners then I can share with you some of the books I have in electronic format, just PM me with an email address.

I can't end a discussion on C++ without mentioning Scott Meyer's books: "Effective C++", "More Effective C++" and "Effective STL"; anyone who thinks they know a bit about C++ should read those books, they are very useful resources and provide excellent C++ tips and tricks.
 

KissofKetchup

New member
May 26, 2008
702
0
0
Here's some reference for syntax and stuff like that for while loops, arrays, etc.
http://www4.ncsu.edu/~awwatkin/OTHER/C++.html
 

Lukeje

New member
Feb 6, 2008
4,048
0
0
I've been learning from C++: A Beginner's Guide [http://www.amazon.com/Beginners-Guide-Second-Herbert-Schildt/dp/0072232153/ref=sr_1_1?ie=UTF8&s=books&qid=1246667487&sr=8-1] by Herbert Schildt. It seems fairly decent so far, and if you can't afford to buy it, could you not order it (or any other books) in at your local library?
 

cainx10a

New member
May 17, 2008
2,191
0
0
Visual C++ for Dummies ---- Start with this one

Don't hesitate to use the web to find out more, there are a lot of resources that I have used in the past.

May I suggest learning about C first instead of C++ ...

1. Learn about the variables
2. Conditional Statement
3. Iteration (looping: while / Repeat {} Until () / etc ... )
4. The infamous '*' and Addressing
5. Using Classes and structured programming


Then go to C++, learn about using classes, functions, overloading functions etc ... etc ...

Then, when you are confident enough ...

Get the C++ Bible ... that one is a BEAST of a book to read through ...

Also, consider C# after you mastered the basics, it's the future of programming or so I have been told.
 

Kaelan

New member
Nov 4, 2007
17
0
0
I'm 16 and broke but I want to learn how to code in C/C++ does anyone know any websites that might help me with this.
I currently use Dev-C++ as my compiler. I know some basics but i cant find any in-depth information on it. I dont have alot of experiance but i know how to make a "hello World"
and a countdown.
1. Get Visual Studio Express, it's free, has tons of useful features and you'll have to get used to similar types of IDEs eventually if you ever go into it professionally. It's normally the standard compiler for most uses, any decent C/C++ programmer should be familiar with it.

2. Start with just plan vanilla C and move to C++ after you're done with that. For sources, I'd recommend "C Programming - A modern Approach, K.N.King", "C++ Primer Plus, Stephen Prata" and once you're comfortable with the language "Effective C++, Scott Meyers". Take it one step at a time, make sure you understand all the fundamental concepts and tools (conditionals, iteration, pointers, classes, memory allocation, the standard library) before moving into more complex stuff.

3. Forget about "easier languages". I'd recommend going with C then C++ instead of whatever else (C#, Java, etc). You can pickup those in a weekend once you properly understand C++ - it's better to struggle with the low level details now, while you're still learning, than not learning it at all and later on having to correct a swath of misconceptions and bad programming practices/habits you may have built up because all the little details were taken care of for you behind the scenes.

Once you understand what's actually going on at the low level in your code, then you can move on to using code that makes it easier for you (i.e. write your own list once before you start using the STL one). Otherwise down the road, you'll start getting seemingly weird problems which arise from the compiler or the language guessing you mean one thing when you actually mean another and you won't understand why it's happening (i.e. like when C# uses references and when it doesn't, for example).

4. As far as internet references, most of the time you'll be ok with http://www.cplusplus.com/ , http://www.parashift.com/c++-faq-lite/index.html and http://www.msdn.com/. Those failing, there's always forums you can ask around at - if the documentation isn't enough help (and the documentation should always be the first place you go to when in doubt), going straight to people is your next best bet. If it's a more complicated question that isn't necessarily covered by your average books or sites, you can always ask at http://stackoverflow.com/.
 

A Pious Cultist

New member
Jul 4, 2009
1,103
0
0
the_abhorsen said:
I still see the words "syntax error" in my nightmares...a very unhappy two months...
Heh. I'm doing code in visual basic as part of a college/sixth-form course, all I can say is "type mismatch" D:
 

DazZ.

Elite Member
Jun 4, 2009
5,542
0
41
A Pious Cultist said:
the_abhorsen said:
I still see the words "syntax error" in my nightmares...a very unhappy two months...
Heh. I'm doing code in visual basic as part of a college/sixth-form course, all I can say is "type mismatch" D:
I did a college course and learnt visual basic after teaching myself C++ for awhile. Hate Visual Basic, but it is alot simpler and to get basic windows apps going for your "hello world" ect, jazz.

Im happy I learnt C++ before I learnt Visual Basic.

OP: I bought aload of books instead as I didn't feel internet tutorials were as easy to learn the very basics with. Taught myself how to use Flash and use Actionscript from the internet though, (after learning C++ from a book first)
 

Reep

New member
Jul 23, 2008
677
0
0
Would Visual Basic be a good starter language? I saw it was advised to at least know some language before attempting C/C++.