Hi to all!
In my code I have:
typedef struct merchandiseLangStruct
{
qint16 iLanguageId; // lang id
QString strMerchandiseName;
// language name };
...
...
...
class A
{
...
...
QHash<qint16, merchandiseLangStruct> m_strNames; // multilanguages names with lang. ids as keys
...
...
public:
inline QString name
(const qint16
& iId
) const { return m_strNames.value(iId).m_strMerchandiseName; };
};
typedef struct merchandiseLangStruct
{
qint16 iLanguageId; // lang id
QString strMerchandiseName; // language name
};
...
...
...
class A
{
...
...
QHash<qint16, merchandiseLangStruct> m_strNames; // multilanguages names with lang. ids as keys
...
...
public:
inline QString name(const qint16& iId) const
{ return m_strNames.value(iId).m_strMerchandiseName; };
};
To copy to clipboard, switch view to plain text mode
If I try to compile this .h file, I get:
CMerchandizeElement.
h: In member function `
QString CMerchandizeElement
::name(const qint16
&) const':CMerchandizeElement.h:91: error: 'const struct merchandiseLangStruct' has no member named 'm_strMerchandiseName'
mingw32-make[1]: *** [debug/CMerchandizeElement.o] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/markofr/Desktop/erosNewCheckout/trunk/Client'
mingw32-make: *** [debug] Error 2
CMerchandizeElement.h: In member function `QString CMerchandizeElement::name(const qint16&) const':
CMerchandizeElement.h:91: error: 'const struct merchandiseLangStruct' has no member named 'm_strMerchandiseName'
mingw32-make[1]: *** [debug/CMerchandizeElement.o] Error 1
mingw32-make[1]: Leaving directory `C:/Documents and Settings/markofr/Desktop/erosNewCheckout/trunk/Client'
mingw32-make: *** [debug] Error 2
To copy to clipboard, switch view to plain text mode
What I am trying to do is to get a string from qhash stored inside struct. How do I do that, please help, I am sure it is some form of stupid mistake but I am getting desperate ...
Bookmarks