Global QVector struct how to?
Solved
General and Desktop
-
Hey guys!
Need some help on how to get a global QVector and a struct working without LNK2001/LNK2005 errors.
Here is my global.h file:
#ifndef GLOBAL_H #define GLOBAL_H #include <QString> #include <QVector> struct gUser { int id; QString name; }; extern QVector<gUser> Users; #endif // GLOBAL_H
In my cpp files i include the global.h from above and get LNK errors. I did try serval other ways but non of them works so far. Is there something wrong with my declaration or? I don't know and hope some onre here can help me out.
Thanks!