Resources for learning C++ and C++ IDEs [duplicate] - c++

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
The Definitive C++ Book Guide and List
Learning C++ Language
Hello I am just starting to learn C++, does anyone have any suggestions for C++ learning resources, for example books and web sites. In addition, does anyone have any suggestions for IDEs?

Many years ago I used Bruce Eckel's books - they were not a 100% perfect but they explained things well. And probably the best thing about them now is they are available online for free. http://www.ibiblio.org/pub/docs/books/eckel/

Are you familiar with any other programming language (like C etc)?
if you are, you should straight away start to get your hands dirty. no use investing more time reading. You can learn more by doing. All you need is to search for "c++ hello world" in google, I do it whenever I want to code in any language.
Websites:
http://www.cplusplus.com/doc/tutorial/
http://www.learncpp.com/
IDE:
I am not sure if you need an IDE. Visual Studio is the only IDE I have seen being used for C++ in industry. Eclipse has plugins for all popular languages.
Since you are just learning the language (I am assuming you are using Windows), I would suggested DevCpp.
Other tools:
If Windows: notepad++
If Linux: gedit & g++
Pitfalls:
learning C++ or java doesnt automatically make you good at object oriented programming (OOP). So please try to learn OOP concepts and apply them in these languages.

Related

Is it possible to develop iPhone/iPad apps all in C++ without writing any Objective-C code? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is it possible to program iPhone in C++
I'm very familiar with C++ and Java. I know iOS doesn't support Java. But I really don't want to learn another new language Objective-C. So is it possible to develop iPhone/iPad apps all in C++ without writing any Objective-C code? Android development gives you NDK as an option for C++ developers. I don't know if Apple gives a similar C++ SDK completely in C++ only.
Look at the JUCE library.
https://www.juce.com/get-juce/
I build my apps using it, but then I'm mostly interested in audio. Even so, the library is very rich in features and mature. The licenses are reasonably priced too. I am useless with Objective-C, but am able to make highly functional apps purely in C++. Check out the forum on the website and navigate to the iOS section.
Also check out the JUCE tag on stackoverflow
https://stackoverflow.com/questions/tagged/juce
..it is a little quiet here, but the main juce forum is quite busy.

How to get started with C++? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
New to C++, help me get started
I'm trying to start learning c++, because I'd like to write a simple graphical game (like Missile Command for example). I have had absolutely no luck finding a development environment that I can work with. I tried Qt, Visual C++ Studio Express, and Code::Blocks with no success, can't even get to the Hello World level with any of them. Qt was just way too complicated. Visual C++ is giving me "Cannot find or open the PDB file" and Code::Blocks says "couldn't create the project directory" even when I run them as administrator.
I know how to code, a little: I've done a lot of scripting work with AutoIt using the SciTE environment, and written a bunch of VBA code. I just want to get started learning C++ so I can start doing some real graphics gaming stuff. But it seems like it's impossible to get set up for even the most basic programming. What am I doing wrong?
Sorry if this doesn't belong on Stackoverflow, if I should take it elsewhere please tell me where.
If you're really serious about learning C++ I would recommend C++ Primer Plus by Stephen Prata (link) It is by far the best introduction to standard C++ I've seen but note that it will only go over STANDARD C++. No graphics or game programming.

Any suggestions on where to learn C online in preparation of learning Objective-C

I've been programming PHP & mySQL for about 8 years now. I understand and make use of modern software architectures and OOP in my projects on a daily basis. I decided I want to learn something new.
I finally decided yesterday that I want to learn C and eventually Objective-C so I can begin creating Mac / iOS applications. (Would you recommend C, C# or C++? I just assumed C would be best.)
That said, I miss the days of programming BASIC tic-tac-toe games on my graphing calculator haha. I'd like to get a very good foundation in C, maybe create some command line games, and then eventually move up to GUI programming with Objective-C
Where would you recommend that I start looking online. I don't just want to understand how to make code work in C, but I also want to understand how and why code work.
Thanks & wish me luck :-)
It's not online, but to learn C, I recommend you read Kernighan and Ritchie's The C Programming Language, 2nd ed. (also known as "K&R"). It is a slim volume that communicates the fundamentals of C89. You can probably find it for free at your local library; that's what I did, anyway. C99 changed a few things, but the core of the language remained the same.
I don't recall whether it gets into the details of how an executable is loaded and linked and how the stack and heap are generally used. For that, check out the latest edition of Patterson and Hennessy's Computer Organization and Design: The Hardware/Software Interface.
If you already understand OOP, and you are conversant with C, then picking up Objective-C is as easy as reading through Apple's The Objective-C Programming Language and looking at a few examples.
Objective-C is simple, but the Mac/iOS frameworks are mammoth. Most of your time learning to program for Mac/iOS using Objective-C will be spent learning the frameworks and how to cooperate with the execution environment (NSApplication/UIApplication, NSRunLoop, the responder chain and event handling, etc.). You can get by with Apple's documentation, but Hillegass's Cocoa Programming for Mac OS X (currently in its third edition) is the standard non-Apple introduction to Mac OS X desktop programming. A clear standard introduction for iOS programming has yet to emerge, but I recommend Conway and Hillegass's iPhone Programming. After reading Hillegass's other book, you'll be comfortable and familiar with the didactic style employed in iPhone Programming.
If you want to do Mac/iOS apps, just learn objective-C. I don't think you will "move up" from C to obj-c, rather you will just learn two different programming languages. Working in C is very different from working in C++ or obj-c. Mastering C will help you become... a master in C, not in obj-C.
I feel it's like saying that you should first learn how to ride a motorcycle in order to learn how to drive a car. Just because they both have wheels, doesn't mean it works like that.
On the other hand, if you feel C would be useful to you for some other reason (which it might very well be), there are many great books on C out there. I recommend the C Programming Language by Kernighan & Ritchie (often referenced just by K&R).
Don't learn C to seed your learning for Objective-C, that step is unnecessary.
I come from a C# background, and when I first started learning Objective-C I had little C experience, which didn't inhibit me when working in Objective-C. The big thing you've got going for your is the OOP and software architecture. That will get you further than learning C.
I found that the best resources for learning Objective-C and specifically iOS programming can be found within Apple's documentation:
Start reading through the iOS Reference Library specifically:
Human Interface Guidelines
Memory Management (this is as close to C as you need to get)
Apple's source code examples are great. specifically:
iPhoneCoreDataRecipes
Another great resource is Cocoa with Love which is written really well and has some great content, specifically:
Assign, retain, copy: pitfalls in Obj-C property accessors
Method names in Objective-C
Debugging tips for Objective-C programming
As well, I've found a lot of people like the AppsAmuck demos. Personally I found that they're coded quite poorly, but there are some good area specific examples for working with animations, urls, etc.
I would recommend learning Objective-C because it's so different C. You should know most of the C-syntax developing PHP.
I don't really think you need to get too deep inside C, just because you usually don't need to use C code while developing in Objective-C (or at least not the features that you would learn). Start directly with Objective-C and try to fill up holes just when needed.
Although Objective-C is considered an extension of C language (in term of its grammar), it replaces almost everything you needed to do in C with Objective-C and its types, so there's no really need to use it so ofter. Usually you need it when interfacing with something low level but not so frequently (since Obj-c wrappers are present for almost everything).
Scott Stevenson's Cocoa Dev Central hosts a lot of useful Cocoa tutorials, including a C tutorial for Cocoa programmers and links to several other useful resources on the topic.
Another good one is Masters of the Void by Uli Kusterer, a longtime Mac programmer.
If you really want to learn C before Objective-C, go for it. For many people it's an unnecessary step, but you will use it eventually. If you decide that you want to skip learning C and dive into Objective-C, Kochan's book is a gentle "from the ground up" introduction.
For C, it's going to be better to get a book than try to find online tutorials. The classic text (like everyone here is saying) is the K&R C book. It's well known as the standard. The problem is that it's very dry and not that great for self-learning. It's more of a classroom book.
The best C book for self-learning is K.N. King's C Programming: A Modern Approach. It's pricey, but is very well paced, in-depth, has comprehension questions at the end of each chapter. I found out about this book from the guy who wrote the classic Objective-C book, Aaron Hillegass. He understands teaching and recommended it because it's a great book to learn from. It will help you to think about C and programming, where K&R will just inform you.
Personally, I gave up on my goal of learning C for iPhone programming and just learned Objective-C from Hillegass's book (and Jeff LaMarche's book). I get confused on the odd occasions that I have to write or understand C code, but it hasn't been a huge hurdle.

what's the best way to learn C++ and Qt at the same time?

Hi I did A Google search and couldn't find anything,
so I wanna learn Qt/C++ my University (I'm a first year CompSci Student) won't be teaching C++ next year which is a big disappointment
I already know Python
and dabbled in LaTeX, Javascript, C++
I'm currently helping out a free software project Clementine but it's programmed in Qt/C++ and I don't know enough of both to help out enough.
Is there any tips, Tutorial, howtos out there?
Don't learn both at the same time. Learn C++, then learn Qt. Grab a book about C++, then a book about Qt; there is no substitute for a good book.
Trying to learn C++ and Qt at the same time is like trying to learn the alphabet while reading Shakespeare.
I don't think it's an impossible thought learning both at the same time. Since you already know Python, try learning some basic Qt concepts by implementing something simple in PyQt or PySide. Learn C++ by writing simple console programs. Once you've mastered C++, try doing the same stuff with Qt using C++. It's a fact that you'll get a lot more help and code examples from people using C++, so you shouldn't just be satisfied with using Python to implement Qt programs.
From Qt's website: How to learn Qt and Qt tutorials.
Since you're familiar with programming already, the Best Practices might be of interest too.

C++ or Python as a starting point into GUI programming?

I have neglected my programming skills since i left school and now i want to start a few things that are running around in my head. Qt would be the toolkit for me to use but i am undecided if i should use Python (looks to me like the easier to learn with a few general ideas about programming) or C++ (the thing to use with Qt).
In my school we learned the basics with Turbo Pascal, VB and a voluntary C course, though right now i only know a hint of all the things i learned back then.
Can you recommend me a way and a site or book (or two) that would bring me on that path (a perfect one would be one that teaches the language with help of the toolkit)?
Thank you in advance.
Being an expert in both C++ and Python, my mantra has long been "Python where I can, C++ where I must": Python is faster (in term of programmer productivity and development cycle) and easier, C++ can give that extra bit of power when I have to get close to the hardware or be extremely careful about every byte or machine cycle I spend. In your situation, I would recommend Python (and the many excellent books and URLs already recommended in other answers).
http://wiki.python.org/moin/PyQt
You can use PyQT for Qt in Python. They have recommendations for tutorials and references on there.
Google "How to learn Qt" and "Learning C++".
There are some decent sources on there.
I have read Rapid GUI Programming with Python and Qt: The Definitive Guide to PyQt Programming by Mark Summerfield , it's cool.
for C++ : C++ GUI Programming with Qt 4 (2nd Edition)
just my two cents.
How about Ruby? You can write Qt apps in Ruby allegedly (http://rubyforge.org/projects/korundum), and it gives you a good excuse to look at the very excellent "Why's Poignant Guide..." (http://poignantguide.net) which is how Monty Python would have introduced programming....
(Actually thinking about learning python myself, so feel free to ignore my advice (but visit Why's site anyway))