Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* stat.h */
- #include <QString>
- struct stat
- {
- QString name;
- QString array2D[2][4];
- }
- extern struct stat myStat;
- /* stat.cpp */
- #include <"stat.h">
- struct stat myStat = { "Structure 1", { {"one","two","three","four"},{"five","six","seven","eight"} } };
- /* stat.cpp */
- #include <"stat.h">
- QString myArray[2][4] = { {"one","two","three","four"},{"five","six","seven","eight"} };
- struct stat myStat = { "Structure 1", myArray}; // BAD!!
- struct stat myStat = { "Structure 1", myArray[][]}; // BAD!!
- struct stat myStat = { "Structure 1", &myArray}; // BAD!!
- /* stat.cpp */
- #include <"stat.h">
- struct stat myStat = { "Structure 1",NULL};
- myStat.array2D = { {"one","two","three","four"},{"five","six","seven","eight"} }; // BAD!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement