Sunday, July 12, 2009

C or C++ for Unix programming?

I know C++ and I just started using Linux (SUSE 10.1 distro) I would like to see what I can do with C++ and Linux, but all the tutorials I look at always seem to say "learn C programming for Unix" or something of that nature. Is it not wise to use C++ when programming in Linux? I want to make programs that interact with the operating system itself, kinda of like windows and there "window services". Any suggestions?








Also if you could supply any good tutorials that deal with progrogramming in Unix that be greatly appreciated.

C or C++ for Unix programming?
C++ is just a superset of C. Use C++ for object orientated programming. If you don't need object oriented programming, for example for small projects, then use C. There's nothing wrong with C++ on Linux / Unix. It is pointless to use C++ if you aren't going to use objects (but in that case the compiled code would be equivalent to C anyway).
Reply:http://www.mindview.net/Books/TICPP/Thin...








Try this book it's c++ and the example code is available for Linux Red-hat installs the examples by default.
Reply:I found this tutorial on what you asked at this link :


http://users.actom.co.il/~choo/lupg/tuto...
Reply:just to chime in, I have a linux programming book, and all of it is in C not c++.





Not sure why that is. I know you can write and compile with gcc in C++, but they may be some reason that C is being used for the low level stuff.





Look at www.linuxforums.org

clear weed

No comments:

Post a Comment