Why is my Elevator Murderous?
When I compile my files I get this warning :
In file included from AsyncSQL.cpp:8:0:
AsyncSQL.h: In constructor 'CAsyncSQL::CAsyncSQL()':
AsyncSQL.h:192:10: warning: 'CAsyncSQL::m_iCopiedQuery' will be initialized after [-Wreorder]
int m_iCopiedQuery;
^
Here is my AsyngSQL.H http://pastebin.com/u72kyuq7 So what am I doing wrong?
The problem is the order in which you initialize members in the initializer list on line 22,
_SQLResult(): pSQLResult(NULL), uiNumRows(0),
uiAffectedRows(0), uiInsertID(0)
These should appear in the same order as they appear in the class definition. For example:
class test {
test(): foo(1), bar(2) { }
int foo;
long bar;
};