How does c++ apply in real life?

In my classes, all of my c++ projects have essentially been "If (4+4 = 8) cout >> 'cat'" I've done arrays, functions, input/output, and it's all just algebra. Can someone please tell me at what point I actually learn how to implement this in a career. I feel like, for example, if I wanted to make mobile apps, I have no knowledge on how to make a button or do anything that isn't math related. It's driving me away because I don't want to just make calculator applications. I've tried Googling this answer and all I get is "Windows is made out of C++." I don't see how that can be if C++ is only simple calculations and algorithms.
Just try making a graphical game in C++. Grab SFML and follow a tutorial for using it in Visual Studio. Replicate pong, frogger, etc and then go for something that uses polymorphism like a top-down game with different kinds of enemies.
Do you have a particular tutorial that you would suggest? I'm using a Mac.
Last edited on
Oh, then use SFML with Xcode. Sorry for making an assumption about your OS ;p

You can technically use SFML with any compiler on any OS, but if you use an uncommon combination you will have to figure out how to make things work yourself (which is not worth the pain, trust me)
Last edited on
You need to learn the basics first, for instance this would never work "If (4+4 = 8) cout >> 'cat'".

Why?
'=' is the assignment operator, '==' is equality.
'>>' is the extraction operator, '<<' is output.
'' is for a character, you are using a string therefore double quotes are necessary "".
; is required at the end of the statement involving cout.
'If' should be all lower case.

With this said, if you had a deeper understanding of the language and the use of using libraries to help construct software, you'd understand that it's entirely possible. It's like someone who's never coded a line before wanting their first project to be an AAA game in the Unreal engine.

I agree, try out SFML.
Last edited on
Game development is a great way to learn and home your coding skills. I actually self-taught myself C/C++ by doing game design and reading books, and it's working pretty well.
Topic archived. No new replies allowed.