I am starting to teach myself C++ with bloodshed, and while i am running windoze, i want to switch to linux.
How is the similarity of C++ programming between the two systems?
Thanks for your help.
I am starting to teach myself C++ with bloodshed, and while i am running windoze, i want to switch to linux.
How is the similarity of C++ programming between the two systems?
Thanks for your help.
The c++ language itself is platform independant, however, there are many extensions to it that are platform dependant. As you're starting out, stick to the basics of the language, and you'll find it to be portable.
Either way though, it's good to know both sides.
Have fun
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
a lot of it depends on what you're going to do. there are only minor variations between windows and linux if you ignore the GUI. while the windows GUI is very much developed, and has a ton of support, linux has XFree86, and some layers on top of that to abstract from (like kde or gnome).
however, gtk and qt are relatively cross-platform compatable with windows and linux. if you want portability, try one of these API's.
Since C++ is platform independant, there really isent any difference when programming in Win32 or UNIX (except for maybe a few functions).
But when you start using APIs, you will notice that the difference is rather large (say Visual C++ has nothing to do with C++ and UNIX programming (sockets, special functions, GUI, etc)
wait
there is a difference
the way the headerfiles and types are defined IS PLATFORM DEPENDENT
you can not tell me that windows and linux's iostreams are identical
basically you wont know a difference until you do platform dependent programming like networking or kernel programming and stuff. I noticed the difference when trying to define new streams.
A good portion of code out there is platform dependent, the only way to run other platform's code on the platform you use is an emulator or a dual boot.
One last thing, Linux's compiler is free
Window's compiler costs at least $80 (for a decent compiler)
gcc -o myfile.lxe myprogram.c
or
g++ -o myfile.lxe myprogram.cpp
note lxe is the executable extension on my Linux edition
lxe = lynux executable
it is a useful thing I recomend implementing it everywhere.
-luke
Asking the right question is sometimes more important than knowing the answer.
Please read the FAQ
C Reference Card (A MUST!)
Pointers and Memory
The Essentials
CString lib