LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-16-2008, 10:53 PM   #1
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Rep: Reputation: 50
Teaching myself C++


Does anyone know if there are tutorials for complete c++ newbies? I am looking for the basic tutorials but I really would like some that have a more hands on approach. I learn much faster if I can do it as I learn it.

I found a few but they are not exactly what I want, though they will be helpful.

I have no real programming knowledge, unless html is considered a programming language. I have played around with php scripts and javascripts, but never writing either. Mainly just editing small things here and there to get them to work better with what ever I was doing at my or others websites. Nothing real or serious.


Edit: I wanted to add that my interest in C++ will be with Linux, a lot more freedom and that I like.


Edit++: I was thinking. Maybe the best way to learn with hands on is to find a simple program already created, open source obviously, and play around with that?

Last edited by Amdx2_x64; 07-16-2008 at 11:16 PM.
 
Old 07-16-2008, 11:57 PM   #2
pgroover
Member
 
Registered: Sep 2005
Location: Colorado
Distribution: Ubuntu
Posts: 56

Rep: Reputation: 16
There are tons of sites that specifically provide what you're asking for, I used to use them back when I first started writing in C++ as well. I thought I had a list of them bookmarked, but I don't. As far as examples of code to use as a starting point, or even actual projects, you could try any of the following:

Code Project
Planet Source Code
Sourceforge

These will all provide what you're looking for, but Code Project has really been emphasizing .NET and similar technologies for quite some time now although there is still good info on the site. There are others of course that a quick google search will provide. Good luck!!
 
Old 07-16-2008, 11:59 PM   #3
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Thank you. Once I get Debian installed, if all goes well, I will check those out and get things set up, etc.

I was also thinking. I was going to install both Debian and Blag. But Maybe I should install Debian twice. Once as my normal OS and the other as my test area?
 
Old 07-17-2008, 12:04 AM   #4
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
1. you can use 'google' to help find some tutorials, but personally I'd say get a book. But before you buy a book, look for honest reviews on it. MOST of the C++ books out there (even by well-known publishers) are 100% garbage. So you want a book which is praised by several university lecturers, preferably lecturers who also have a long list of books which they criticise and say "don't buy this garbage". Many people (university lecturers included) write reviews filled with praise because they somehow stand to benefit from the sale of a particular book; some university lecturers were raised with bad books and recommend bad books. So look for a reviewer who says WHY a book is good or bad and gives many examples. Well-known authors who are programmers do not necessarily write good books either, so don't think "that guy is famous, his book is probably good".

I would not recommend attempting to understand someone else's program until you have quite a bit of experience coding. You will find that most small open source programs are in fact C code, and that most C++ projects are HUGE. Either way, even small programs can use many techniques which would be easily understood by a long-time hacker, but be absolutely cryptic for a beginner.
 
Old 07-17-2008, 12:14 AM   #5
pgroover
Member
 
Registered: Sep 2005
Location: Colorado
Distribution: Ubuntu
Posts: 56

Rep: Reputation: 16
I have to agree with pinniped about how to go about choosing a book since many people who recommend a book do tend to gain in some fashion by it's purchase. It is true, in some regard, that it can be very difficult to learn coding by reading/reverse engineering other's code, especially when you're just starting. But like all things, that depends on the individual, especially considering some actually attend classes and won't get it in a million years.

Regardless, curling up with a good book can definitely go a long way towards helping you get started. Also, bear in mind that simply because it is found on Google does not make it correct.
 
Old 07-17-2008, 01:03 AM   #6
god_is_good478
Member
 
Registered: Jun 2004
Location: Singapore
Distribution: RH9 FC2/3 Mandrake10 Solaris 9
Posts: 31

Rep: Reputation: 15
I like this site for reference

http://www.cplusplus.com/doc/tutorial/

also there is usually some example code...

googling will get you some source, but you have to be careful whether the code is standard or is there some custom library, whether on windows/linux etc

But a book would be good for understanding how the language works
 
Old 07-17-2008, 02:24 AM   #7
rogx
LQ Newbie
 
Registered: Jan 2005
Location: Roma, Italy
Distribution: slackware, slamd64
Posts: 23

Rep: Reputation: 15
try also:

C and C++ in 5 days - Philip Machanick
http://www.box.net/shared/static/qqtm40rory.pdf

C++: A Beginner's Guide, Second Edition - Herbert Schildt
http://www.freebookspot.com/Comments...lement_ID=4127

Bye, Rogx.
 
Old 07-17-2008, 04:17 AM   #8
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Thank you for all the replies and links. I have downloaded the pdf files as well as saved the urls. This should be a great start.

I did try Google and I was a bit frustrated. I like having options and a variety to choose from but I had a little TOO much to choose from and I wasn't sure where to start. With the info I have now, and the more I learn, I will be able to sort through that a bit better now.
 
Old 07-17-2008, 05:42 AM   #9
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Quote:
I was also thinking. I was going to install both Debian and Blag. But Maybe I should install Debian twice. Once as my normal OS and the other as my test area?
I think you can test your program into your normal environment, don't be afraid to totally crash your system because you have make a programming mistake...
 
Old 07-19-2008, 07:19 AM   #10
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
oop is horrible. dont learn c++ .
 
Old 07-19-2008, 09:20 AM   #11
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by resetreset View Post
oop is horrible. dont learn c++ .
Care to say why?
 
Old 07-19-2008, 09:25 AM   #12
pgroover
Member
 
Registered: Sep 2005
Location: Colorado
Distribution: Ubuntu
Posts: 56

Rep: Reputation: 16
Quote:
Originally Posted by resetreset View Post
oop is horrible. dont learn c++ .
I'd really like to hear why as well...
 
Old 07-19-2008, 09:37 AM   #13
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
well - i just don't understand what it IS, i read about it for the first time a loooong time ago. the *basic* thing about it is that it's all about you using someone elses program, and specfically without caring whats inside it. i *still* dont understand why that can't be done with simple linking of object files, but this whole discussion doesnt arise - both these things go against my grain. i would have simply told everyone that it's useless - UNTIL I saw 3D Studio Max for Windows. that thing is a huuuuuge program, probably written by at least 10s, if not hundreds of people, all of which have to synschronise with one another - it's absolutely amazing, and yes, i think i saw a little justification for OOP, just a little - there's also the fact that everything inside the linux kernel has been written by 100s of people, over the *internet* (although with the no. of people that max would have working on it, it really hardly makes a difference that it's the same company - they may be in different buildings, different floors, really the same thing as being in different countries - if there program had a variable "groo" in it, they couldn't just yell out across the room to tell everyone else not to use it), actually they may just have BEEN in different countries as well!).
but *i'm* not using it.

Last edited by resetreset; 07-19-2008 at 09:40 AM.
 
Old 07-19-2008, 09:45 AM   #14
pgroover
Member
 
Registered: Sep 2005
Location: Colorado
Distribution: Ubuntu
Posts: 56

Rep: Reputation: 16
Quote:
Originally Posted by resetreset View Post
the *basic* thing about it is that it's all about you using someone elses program, and specfically without caring whats inside it. i *still* dont understand why that can't be done with simple linking of object files
True, in the *basic* sense that is what it can mean when you are provided a library from an external source, but there's more to it than that. Using OOP, it's much simpler to model actual events, items, etc. within code, and in effect making something a lot simpler to implement.

It sounds like you're actually using it without knowing it if you are already linking against others' object files. In a nutshell, OOP allows you to create an instance of an object and to perform actions against it or use it to perform actions against other objects. Software engineering is so much easier that way. If you're using classes, or objects in any way then you are using OOP to some extent without knowing it.
 
Old 07-19-2008, 09:48 AM   #15
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Also, writing C++ programs does not mean you have to use OOP.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Teaching Linux for the beginners... tenzan Linux - General 4 09-16-2005 12:37 PM
Word teaching mindspin Linux - Software 3 09-27-2004 05:22 AM
Teaching Linux madunix Linux - Networking 4 05-12-2004 01:53 PM
teaching active directory w/o teaching network concept (possible???) Tafta General 4 01-21-2004 06:12 PM
Teaching Linux evilmrhenry Linux - General 5 11-14-2003 06:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration