How to tell if a lib is a static lib or a dynamic lib?
A lib file name typically ends with .a or .lib. A .a suffix lib is a static lib but a .lib suffix lib is either a static lib or an […]
A lib file name typically ends with .a or .lib. A .a suffix lib is a static lib but a .lib suffix lib is either a static lib or an […]
What is a const function? Const functions are defined like int fun() const But only a member function can be const, i.e., there is no concept of const function outside […]
To check the type of a variable in C++, you can use typeid(variable).name(), for example #include <typeinfo> … … int b=9; char c=’a’; char * p=&c; int *d; printf(“%s\n”,typeid(b).name()); printf(“%s\n”,typeid(c).name()); […]
As an old programmer, when I debug a program, the first option is neither using qDebug()<<“helloworld”, nor using cout<<“helloworld”, not mention QMessageBox::information(this,”hello”,”world”). I’d like to use the old printf function. […]
Look at this simple code: QString s=”abcd”; char * ts=s.toLocal8Bit().data(); QMessageBox::information(NULL,”length”,QString(“s length:%1, ts length:%2”).arg(s.length()).arg(strlen(ts))); What do you think about the length of s and ts? Are they both 4? No, […]
You may want to use QMAKE_CXXFLAGS, but it only passes the arguments to g++ at the compiling stage(i.e., g++ -c …) not at the linking stage. To pass arguments to […]
You must know they are all related to unicode but how to use them? UNICODE definition is used in Windows SDK source code. If it is defined, functions like RegSetValueEx […]
Yes, you really can build out the dll that contains your COM server according to this guide. But the story just begins. When you register your dll with “regsvr32 myprogrammingnotes.dll”, […]
To build Qt 4.8 with MingW, you have to use a proper MingW version. The latest MingW won’t build Qt 4.8. You will get weird problems such as “qsimd.cpp:296:23: error: […]
How to define a Javascript object? The key of an object can be an identifier/symbol(an identifier is a continuous alphabeta/number/_ that does not begin with a number), a number, or […]