Thread: Windoze programming to linux programming

  1. #1
    I hate Sinus infections
    Join Date
    Nov 2002
    Posts
    181

    Windoze programming to linux programming

    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.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    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]

  3. #3
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    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.

  4. #4
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187
    there are only minor variations between windows and linux if you ignore the GUI.
    At least there is an incompatible header conio.h on Windows/DOS and curses.h on Linux/Unix.
    slackware 10.0; kernel 2.6.7
    gcc 3.4.0; glibc 2.3.2; vim editor
    migrating to freebsd 5.4

  5. #5
    Registered User unixOZ's Avatar
    Join Date
    Feb 2002
    Posts
    91
    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)

  6. #6
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wireless Network Linux & C Testbed
    By james457 in forum Networking/Device Communication
    Replies: 3
    Last Post: 06-11-2009, 11:03 AM
  2. Dabbling with Linux.
    By Hunter2 in forum Tech Board
    Replies: 21
    Last Post: 04-21-2005, 04:17 PM
  3. installing linux for the first time
    By Micko in forum Tech Board
    Replies: 9
    Last Post: 12-06-2004, 05:15 AM
  4. Preserving Windoze date while installing linux
    By windoze victim in forum Tech Board
    Replies: 10
    Last Post: 04-02-2003, 10:17 PM