C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 11-27-2002, 07:06 PM   #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.
windoze victim is offline   Reply With Quote
Old 11-27-2002, 07:21 PM   #2
End Of Line
 
Hammer's Avatar
 
Join Date: Apr 2002
Posts: 6,240
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]
Hammer is offline   Reply With Quote
Old 11-27-2002, 09:40 PM   #3
Just because
 
ygfperson's Avatar
 
Join Date: Jan 2002
Posts: 2,502
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.
ygfperson is offline   Reply With Quote
Old 11-29-2002, 11:25 AM   #4
still a n00b
 
Jaguar's Avatar
 
Join Date: Jun 2002
Posts: 187
Quote:
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
Jaguar is offline   Reply With Quote
Old 11-29-2002, 09:08 PM   #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)
unixOZ is offline   Reply With Quote
Old 12-05-2002, 02:02 AM   #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
Lynux-Penguin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 11:33 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22