Jump to content
  • Advertisement
Sign in to follow this  
Namir

What's the difference between...

This topic is 4608 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
C++ is C++, the main things that are a pain are the differences in compilers, IDEs, makefiles, etc...

Share this post


Link to post
Share on other sites
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!