Possible Duplicate:
C++ Portability between Windows and Linux
i am new to c++ programming and i dont really know much about it
i am runn开发者_运维问答ing linux (ubuntu) in my desktop and my laptop is running windows but it has charger problems.. anyway, what i want to do is to program softwares in linux and run them in my laptop (windows)... so my question is is there any difference between programming c++ in linux and windows and if the generated program only runs on linux, can i re-compile the code that has been compiled and ran fine in linux??
i have looked in google but i didnt really get useful informations!C++ code can be compiled quite happily on Linux, Windows and a gazillion other platforms. Where you will have problems is with the libraries that you link to. So long as you stick to the standard library of C++ or highly portable libraries like boost then you should have relatively few issues. If you link to a library that is only available on one of the platforms, then you will hit trouble.
精彩评论