Link to home
Start Free TrialLog in
Avatar of zxcvzxcv
zxcvzxcv

asked on

Good C++ Book

Hi,
I've programmed C++ (with MFC) for Windows for about 2 years, but now I'm making the switch to Linux. I'm looking for a good book that could teach me how to program C++ for Linux.
Avatar of XTerm
XTerm

Well, the ANSI C++ si exactly the same, but MFC does not exist in Linux. I recommend (since you know MFC) to buy a book on QT.
Avatar of zxcvzxcv

ASKER

To run certain KDE apps I've noticed that I needed to get certain QT versions, and libraries, what exactly is QT?
ASKER CERTIFIED SOLUTION
Avatar of XTerm
XTerm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ow, Sorry, I was copying some files, and my system gets very laggy then, accidents happen
Here is the example...

#include <qapplication.h>
#include <qlabel.h>

int main(int argc,char **argv)
{  
   QApplication *app = new QApplication(argc,argv);
   QLabel *l = new QLabel("Hello world",0,0);
   app->setMainWidget(l);
   l->show();
   app->exec();
   delete app();
   return(0);
}

Voila that's it. KDE has a wonderfull program named KDevelop, it's an C++ IDE that I believe is better than the VC++6 IDE. Qt 's events are handeld through signals and slots. For example you can connect a button's click signal to a function. It's done with one line of code. Very easy. Qt comes with excellent documentation in HTML or PDF.

www.trolltech.com

Cheers
One must-have C++ book is "The C++ Programming Language" from Bjarne Stroustrup. The one I got is from Addison Wesley. An excellent book, but not intended for newbies.
For Qt I got "Qt programming for Linux and Windows 2000" from Patrick Ward, Published by Hewlett Packard??Professional Books.

Cheers again
thank you very much!