Jump to content

This is a followup to a post I made a while ago about IDE's for programming C++. I have since got Ubuntu running on a VM on my desktop so now I can use linux to program rather than windows like I did Java when I was learning that.

 

This is something that popped up in the previous thread that made me a bit confused:

 

How many different versions of C++ are there? And how different are they?

 

For example, how different would programming for a windows computer be vs.. A phone for example if I'm trying to create the exact same game?

 

And which version would be ideal to start from to just get familiar with the language?

Link to comment
https://linustechtips.com/topic/261489-c-confusion/
Share on other sites

Link to post
Share on other sites

I can't give you a very specific answer, but what I can tell you is that there is the ability to have countless "versions" of C++; it's all dependent on your compiler from my understanding. (I apologize if anything is wrong, I consider myself a layman. Correct anything, if it's not accurate)

 

The base language follows the same parameters and is used across the board, but how it's compiled for the OS to interpret to machine code is different for each device. To utilize OS specific things, you would have to program it differently and compile it for that OS. Though, if you were to make the basic "Hello world" program, all it would require is a recompile for each OS.

 

Some libraries like SDL aim to have each program compile for each OS and still function without any change in code (see more at this Steam Pipeline video I recommend watching the whole video, but the part is at around 21:00)

 

The primary idea behind C++ is WOCA: "Write once, compile anywhere". As such, C++ has it's own standards which allow each programmer with the source code to. Any difference is mostly how the compiled program reacts with the hardware and/or OS (hardware specifically if you decide to implement ASM).

 

So far, there have technically been four C++ standards: ISO/IEC 14882:1998 (C++98), ISO/IEC 14882:2003 (C++03), ISO/IEC TR 19768:2007 (C++TR1), and ISO/IEC 14882:2011 (C++11). I give loving credit for this list to Wikipedia. They're not much different, but only by adding things. C++ has always had the idea of building on the past, which is why you can compile C with C++ compilers. Probably C++11 because it's the most current standard.

 

Really, the best place/way to learn is whichever one isn't too difficult. I "taught" (I guess "am teaching" is more acute) myself by using cplusplus.com with their great documentation and tutorials. For anything that might be compiler-specific or cause errors I would recommend looking up their documentation and/or asking for more specific help on forums, such as this fantastic one.

 

I hope I have helped!

Link to comment
https://linustechtips.com/topic/261489-c-confusion/#findComment-3562518
Share on other sites

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×