When typedef is used the struct definition should follow with the new typename. You are specifing the variable (array) instead of typename. Correct way to specify is below. Also typedef does not have much use in C++ (as explained by wysota), unless you are porting C based code, and don,t want to change it.

Qt Code:
  1. class Myclass
  2. {
  3. private:
  4. struct MysampleStruct{
  5. int x;
  6. int y;
  7. }Mysample[3];
  8. };
  9. // or
  10. class Myclass
  11. {
  12. private:
  13. typedef struct MysampleStruct{
  14. int x;
  15. int y;
  16. }MysampleStructType;
  17.  
  18. MysampleStructType Mysample[3];
  19. };
To copy to clipboard, switch view to plain text mode