Author

Topic: Learning C++? (Read 664 times)

hero member
Activity: 686
Merit: 504
always the student, never the master.
June 06, 2014, 01:19:55 PM
#18
Thinking of building an android game?  Cheesy
hero member
Activity: 1492
Merit: 763
Life is a taxable event
June 06, 2014, 01:15:09 PM
#17
Even as a noob to programming I know you don't need to learn C at all really, C++ is very similar to C but its pretty much standalone, you only have to worry about C and C++ if you've been learning C and are moving onto C++ but the only people who would be doing that are pretty old.

I'm a total noob, the last time I programmed was in 8th grade using a floppy disk drive (not the floppy kind 6 years ago, it was an educational language like cpp), I also took a python class a year ago but I didn't use anything I learned.

I'll use programming principles and practices using cpp as well as the other book I'm getting from amazon.

Thank you all for the help!
legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
June 06, 2014, 01:13:25 PM
#16
these are part of c language in which STDIO.H is used for include input/output file from the library and this coding which you are using its form c language . C++ is an object oriented language in which we need make a class and need to call it from the main function

Code:
#include

using namespace std;

int main( )
{
   cout << "Hello World!" << endl;
}

This is what "Hello World!" looks like in C++.

(no ".h" includes and no "printf" statements)

C++ supports various different programming "paradigms" (including procedural, OO, functional and TMP) so you don't need to create a class to do anything in C++ (unlike Java) but you should get familiar with "iostreams" right from the "get go".
sr. member
Activity: 288
Merit: 250
June 06, 2014, 01:11:13 PM
#15
If you can, use either a physical book or an e-book. If you end up using an e-book, don't copy-paste code. You want to type in everything, even if it gets repetitive. If you feel like you are typing the same thing over and over again, trust me, it's for a reason.
full member
Activity: 126
Merit: 100
June 06, 2014, 01:10:08 PM
#14
#include

Not part of C++.

    puts("Enter the 1st number:");
    scanf("%d",&num1);
    puts("Enter the 2nd number:");
    scanf("%d",&num2);
   
Not things you use in C++.

Any reference telling you that you need to know C in order to learn C++ is just plain *wrong*.


these are part of c language in which STDIO.H is used for include input/output file from the library and this coding which you are using its form c language . C++ is an object oriented language in which we need make a class and need to call it from the main function
legendary
Activity: 1540
Merit: 1000
June 06, 2014, 11:59:29 AM
#13
Even as a noob to programming I know you don't need to learn C at all really, C++ is very similar to C but its pretty much standalone, you only have to worry about C and C++ if you've been learning C and are moving onto C++ but the only people who would be doing that are pretty old.
legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
June 06, 2014, 11:58:09 AM
#12
#include

Not part of C++.

    puts("Enter the 1st number:");
    scanf("%d",&num1);
    puts("Enter the 2nd number:");
    scanf("%d",&num2);
   
Not things you use in C++.

Any reference telling you that you need to know C in order to learn C++ is just plain *wrong*.
hero member
Activity: 1492
Merit: 763
Life is a taxable event
June 06, 2014, 10:53:37 AM
#11
For starters please understand that C is *a different language* to C++.

Don't make the mistake of thinking the you want to learn C in order to learn C++.

If you do that you'll end up learning a bunch of *wrong* stuff (from a C++ perspective) and end up with a bunch of *bad habits* that you'll then painfully end up having to *unteach yourself*.

I have been coding C++ for at least 20 years now so I do know what I am talking about.


I'll keep that in mind, however, in chapter 3 of thinking in C++ there is the following

Quote
Since C++ is based on C, you must be familiar with the
syntax of C in order to program in C++, just as you
must be reasonably fluent in algebra in order to tackle
calculus.

I probably won't use this book

So it has a tutorial touching on C as a foundation http://mindview.net/CDs/ThinkingInC/beta3 It's interesting and I'm not in a hurry so I'll go through this until I receive the book I ordered from amazon.


/* avg.c: Averages 2 integers */
#include

int main() {
    int num1, num2;
    float sum;
   
    puts("Enter the 1st number:");
    scanf("%d",&num1);
    puts("Enter the 2nd number:");
    scanf("%d",&num2);
   
    sum = num1 + num2;
    printf("The average is %f\n", sum/2);
    return 0;
}

This would probably be easier in python. Would it be faster in python as well? Or pretty much the same?

I won't stick to this I'll just use it till my book arrives, I just get this creeping feeling that learning C is kind of pointless.

legendary
Activity: 1540
Merit: 1000
June 06, 2014, 03:41:53 AM
#10
I highly recommend getting the book C++ Primer 5th Edition which I was recommended ( don't get any other version ) the reason being is they do an incredibly good job of explaining the basics in proper English to you and if you take your time you'll genuinely be able to understand the code rather than do guess work on it because of incomplete bits. The book has an entire glossary at the back which explains all the programming terms such as Data Structures or Classes ( CLASSES AND HEADERS ARE VERY IMPORTANT FOR GOOD ORGANISED CODE ) and so on so when you talk to other programmers you won't be wondering what the fuck is going on, vocabulary has been a particular bane of my learning because people on the internet don't always explain things clearly so this was very helpful to me.

http://www.amazon.co.uk/Lippman-Stanley-published-Addison-Wesley-Professional/dp/B00E28QQZO/ref=sr_1_2?s=books&ie=UTF8&qid=1402040328&sr=1-2&keywords=c%2B%2B+primer+5th+edition

If you're just wanting to learn C++ by itself, this will help you a lot, that said I know programmers here are talking about learning 'C++' but honestly you will end up learning libraries far more than you learn the original code they came from if that makes any sense, especially if you want to do something with the code and write programs.
legendary
Activity: 1890
Merit: 1072
Ian Knowles - CIYAM Lead Developer
June 06, 2014, 02:54:46 AM
#9
For starters please understand that C is *a different language* to C++.

Don't make the mistake of thinking the you want to learn C in order to learn C++.

If you do that you'll end up learning a bunch of *wrong* stuff (from a C++ perspective) and end up with a bunch of *bad habits* that you'll then painfully end up having to *unteach yourself*.

I have been coding C++ for at least 20 years now so I do know what I am talking about.
legendary
Activity: 1078
Merit: 1003
June 06, 2014, 02:50:55 AM
#8
I learned from the book written by the inventor himself: http://www.amazon.com/Programming-Principles-Practice-Using-C/dp/0321543726

It's for beginner programmers so you should get everything you need while learning the language.
hero member
Activity: 1492
Merit: 763
Life is a taxable event
June 06, 2014, 01:58:34 AM
#7
http://www.cprogramming.com/

if you want to learn some basic of c++ you can try here. this is a nice site where we can study easily and example for programming also available here

I saw this site and liked the look of it so I ordered this book http://www.amazon.com/Jumping-into-C-Alex-Allain/dp/0988927802 (paperback) (since it was very recent, only 1 year old) and had really good reviews.

One of the best books you can read:



Thinking in C++ by Bruce Eckel aims to "move you, a little at a time, from understanding C to the point where the C++ mindset becomes your native tongue."
It begins by introducing object oriented programming and moves into covering more advanced C++ over the course of two volumes.

It's free, you can download it here (2 volumes):  http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

Thanks, I'm checking it out, I really like the personality of this author.

I like having all these different options open to me. Ultimately this is going to be a hobby for a few years (since I want to be a truck driver for a while (I love travelling long distance)).

full member
Activity: 196
Merit: 101
June 06, 2014, 01:20:07 AM
#6
One of the best books you can read:



Thinking in C++ by Bruce Eckel aims to "move you, a little at a time, from understanding C to the point where the C++ mindset becomes your native tongue."
It begins by introducing object oriented programming and moves into covering more advanced C++ over the course of two volumes.

It's free, you can download it here (2 volumes):  http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html
full member
Activity: 126
Merit: 100
June 06, 2014, 01:05:29 AM
#5
http://www.cprogramming.com/

if you want to learn some basic of c++ you can try here. this is a nice site where we can study easily and example for programming also available here
hero member
Activity: 1492
Merit: 763
Life is a taxable event
June 06, 2014, 12:58:07 AM
#4
C++ type language have steep learning curve.

Cheaper to hire a developer unless you considered your time free.



 Grin My time is free as I am a college student (on break this summer)

Now I've installed the codeblocks IDE (also installed the Microsoft Visual Studo one but did not use it as the Terms said trial) and haven't gotten far.

I'm at the Hello World program and I'm thinking of watching some Game of Thrones at this point since it's so late.

Since I haven't gotten to the library yet (because the night is dark and full of terrors (and closed libraries)) I don't have a physical C++ book. (Although I'm sure I can get 1,000,000 off the net in e-book form.

Is there a book that really helps beginners like me to get into programming and c++ that you would recommend? Even if I have to buy it through Amazon?

full member
Activity: 231
Merit: 100
June 06, 2014, 12:08:45 AM
#3
C++ type language have steep learning curve.

Cheaper to hire a developer unless you considered your time free.

legendary
Activity: 882
Merit: 1000
June 05, 2014, 10:32:07 PM
#2
One of the best things to learn a new language (at least for me), was to buy a physical book. This forced me to re-type snippets of code to verify that they worked, rather than copy/paste.
hero member
Activity: 1492
Merit: 763
Life is a taxable event
June 05, 2014, 10:23:57 PM
#1
I'm starting to learn C++, my only previous experience was a little bit of python, a little bit of java script, a little HTML5 and a lot of an educational language (glosomatheia) but I'm really rusty.

Do you have any recommendations for me? (Compilers and environments especially) I'll go out to the library and rent a couple of books tomorrow as well.
Jump to: