Thread: C++ portability.

  1. #1
    Unregistered
    Guest

    C++ portability.

    Hi everybody!

    I wanted to ask you something, I programmed a GUI in C++. I wanted to know if C++ is as portable as C code, I mean, can C++ code be easily ported to other platforms like Windows, Linux, Mac, XBox, etc? Are there any advices about this? Are all C++ functions supported in other platforms?

    Thx in advance! Regards, Joy

  2. #2
    Registered User mfc2themax's Avatar
    Join Date
    Aug 2001
    Posts
    347
    >I wanted to know if C++ is as portable as C code<

    Depends on the application you wrote......

    >I mean, can C++ code be easily ported to other platforms like Windows, Linux, Mac, XBox, etc?<

    Not really. Espically if your creating win32 centric GUI's.....
    mfc2themax-Creator of all that is.

  3. #3
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Generally speaking, C++ is just as portable as C code as long as it's ANSI standard. Speaking of GUIs, most are not portable, because graphics and windowing tends to depend on the operating system i.e. Windows/Linux.

    For a specific answer, specific facts would be helpful
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  4. #4
    Unregistered
    Guest
    Sure, I know... In this case, windows and controls management code is independient of the OS. If Im not wrong, there are only 3 or 4 functions that must be provided for each OS/platform (input management and drawing functions)...I just wanted to know if functions like <dynamic_cast> and all those c++ functions can be supported by other systems.

    Mhhh...is the STL supported in Mac and Linux? Can a program that uses the STL be considered 'portable'?

    Regards...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. COM application portability
    By Opariti in forum Windows Programming
    Replies: 3
    Last Post: 11-21-2008, 01:17 PM
  2. Portability
    By rwmarsh in forum C++ Programming
    Replies: 2
    Last Post: 07-04-2006, 10:36 PM
  3. Replies: 1
    Last Post: 10-24-2005, 06:35 AM
  4. Program Portability (code portability)
    By Perica in forum C++ Programming
    Replies: 2
    Last Post: 11-10-2002, 10:03 AM
  5. what does portability mean?
    By elad in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 10-03-2002, 02:46 AM