tips48 Posted January 18, 2013 Share Posted January 18, 2013 Just curious on how you guys learned C++, and just in general any tips. I'd ideally not want to purchase anything like a book, but if you've found that it's a great resource worth my money then I'll consider it. The only other programming language I really know is Java, so i'm fine with OOP. I also understand PHP if it makes a difference Thanks!- tips EDIT: Sorry that this doesn't really flow, I have the flu and aren't thinking straight :D Link to comment Share on other sites More sharing options...
obfuscator Posted January 18, 2013 Share Posted January 18, 2013 The only way to learn a programming language is to start using it. For c++ in particular this book comes highly recommended: http://www.amazon.com/dp/0201700735/?tag=stackoverfl08-20 "It's not a rest for me, it's a rest for the weights." - Dom Mazzetti Link to comment Share on other sites More sharing options...
tips48 Posted January 19, 2013 Author Share Posted January 19, 2013 The only way to learn a programming language is to start using it. For c++ in particular this book comes highly recommended: http://www.amazon.co...tackoverfl08-20I meant more like a website to learn the basics/what it can do Link to comment Share on other sites More sharing options...
Hedgehog Posted January 19, 2013 Share Posted January 19, 2013 If you have some programs written in Java, try rewriting them in C++. It'll help you gain a feel for the language, without really having to worry about the logic. Definitely recommend the book that obfuscator posted. This is a good reference too, I guess: http://www.cplusplus.com/doc/tutorial/introduction/ Link to comment Share on other sites More sharing options...
tips48 Posted January 19, 2013 Author Share Posted January 19, 2013 If you have some programs written in Java, try rewriting them in C++. It'll help you gain a feel for the language, without really having to worry about the logic. Definitely recommend the book that obfuscator posted. This is a good reference too, I guess: http://www.cplusplus...l/introduction/That sounds like a good idea, thanks.I'll check out the website and book! Link to comment Share on other sites More sharing options...
tips48 Posted January 19, 2013 Author Share Posted January 19, 2013 If you have some programs written in Java, try rewriting them in C++. It'll help you gain a feel for the language, without really having to worry about the logic. Definitely recommend the book that obfuscator posted. This is a good reference too, I guess: http://www.cplusplus...l/introduction/I seem to get lost right around in here: http://www.cplusplus.com/doc/tutorial/pointers/ Link to comment Share on other sites More sharing options...
Hedgehog Posted January 19, 2013 Share Posted January 19, 2013 Their guide to pointers isn't very good. Honestly, I didn't understand them at all until they came up in class recently. Just know that their main use is for returning arrays. Google how to return arrays in C++ and you'll probably have a better understanding of them. Link to comment Share on other sites More sharing options...
obfuscator Posted January 19, 2013 Share Posted January 19, 2013 This may be helpful if you're having difficulty with pointers. "It's not a rest for me, it's a rest for the weights." - Dom Mazzetti Link to comment Share on other sites More sharing options...
tips48 Posted January 19, 2013 Author Share Posted January 19, 2013 The only thing I don't get is why you would want to use the pointer. LIke what advantage is there to passing a pointer instead of just the variable itself?Either way, I'll google that and read that link Link to comment Share on other sites More sharing options...
Veiva Posted January 19, 2013 Share Posted January 19, 2013 The only thing I don't get is why you would want to use the pointer. LIke what advantage is there to passing a pointer instead of just the variable itself?Either way, I'll google that and read that link Pointers can be abstracted as references. When you pass a class in Java as a parameter, it passes it by reference; that is, it does not create a copy of the class. Instead, it passes the address of the data to the method. The same goes for storing it. The difference between this C++ code: class A { public: int foo; }; void ChangeFoo(A* a) { a->foo = 1; } and this Java code: class A { public int foo; } static void changeFoo(A a) { a.foo = 1; } is nonexistent. Java internally passes classes as pointers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now