Sign in to follow this  
Namir

What's the difference between...

Recommended Posts

Namir    122
I'm not a great C++ programmer to start with, but I've always been taught how to do it on Windows. I'm working on a few things that will need to run on Linux, and I am wondering just what the differences are between C++ on Windows and C++ on Linux. What should I look out for, how are programming standards different, and are there any (good) newbie-friendly resources I can look at? I'm not too knowledgable of Linux, either, so don't try tell me go change something without giving me instructions on how to do it. :) All part of my hey-you-need-to-broaden-your-horizons personal project.

Share this post


Link to post
Share on other sites
Sneftel    1788
The language is the same. However, it's important to understand that the language itself doesn't really do anything useful, like printing stuff, seeing where the mouse is, creating a window, getting input, etc. The C++ standard library (which is also the same) does a little of that, but not much. It's sort of a lowest common denominator. In order to do things like graphics, you will be going beyond bare C++ and into platform-specific stuff. Libraries like SDL exist to make platform-specific stuff work across several platforms; if you're interested in your programs working across different platforms, and you're willing to do some extra work to accomplish that, check out SDL.

Tutorials which do not do graphical stuff, and instead stick to I/O via cin and cout, will generally work on any platform. Of course, you still have to figure out how to set up your build environment to compile and link them properly, which can be a royal pain in the tuckus. We can help, though, and also googling any errors you get will almost always turn up useful information.

Share this post


Link to post
Share on other sites
Namir    122
Yeah.

I've heard nasty things about whitespaces and line returns, mostly. But I was concerned about jumping over to my Linux computer (which doesn't have the internet, which makes it extremely inconvient), start programming away, and find, "Hey... I have no idea what I'm doing now."

Edited to add:
I'm not going to be worrying about graphics and GUI stuff. For that, there is Java. :) Or atleast, I hope there is Java. Mostly, I am going to be practicing C++ for a while, and then try to build a text-based game with it.

Share this post


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

Sign in to follow this