From your question I can't tell how much you know about programming, so apologies if you think I'm going too basic with my answer.
When you compile a c++ program, it churns out a binary file that you can run directly. You can run it only on the platform it was compiled in e.g. a program compiled in linux will not run in windows, and vice versa. This is because different operating systems are not compatible at the binary level. Wine is a program that lets you get around that to a degree, as in it lets you run some windows programs in linux.
Now, that doesn't mean that a program written in c++ can't be compiled in a different platform to be run there. This is definitely possible. There are however restrictions, as in you have to avoid using any OS specific functions or libraries. For example if your program uses any win32 system calls or uses MFC etc., it will not compile on linux.
It is easy enough to avoid using os-specific libraries if you are writing a console application, but if you are writing a GUI application it can be tricky. Until .NET came out, almost all GUI desktop apps in windows were written using MFC (games are an exception).
What you can do though, is use a cross-platform GUI library such as:
wx-widgets - http://www.wxwidgets.org/
or QT - http://trolltech.com/products/qt
If you write your app using one of those, it will compile on any OS supported by them (provided you don't have any other OS-specific code of course).
It is generally also good practice to avoid using platform specific features unless you really need to. The STL and BOOST provide plenty for most type of programs.