Hi all,
I am using Pardus(Linux) and gcc 4.
I have static QHash member .I can compile my code correctly but when i want to run my code and insert any data it gives segmentation fault error.My Code is like that:
//initializer.h
class initializer
{
public:
static QHash<QString,QString> myHash;
}
class initializer
{
public:
static QHash<QString,QString> myHash;
void insertToHash(QString str1,QString str2);
}
To copy to clipboard, switch view to plain text mode
//initializer.cpp
QHah<QString,QString> initializer::myHash;
{
myHash.insert(str1,str2);
}
QHah<QString,QString> initializer::myHash;
initializer::insertToHash(QString str1,QString str2)
{
myHash.insert(str1,str2);
}
To copy to clipboard, switch view to plain text mode
It gives runtime segmentation fault error.is anybody know where is the problem?
Thanks in advance
Ramazan
Bookmarks