If the structure is tightly related to the class, it can be declared as in your code however it might be better to declare it inside the class.
class readHeader : ... {
public:
struct headerInfo {
int numberOfSamples;
int numberOfLines;
// ...
};
headerInfo getHeaderInfo() const { ... }
};
class readHeader : ... {
public:
struct headerInfo {
int numberOfSamples;
int numberOfLines;
// ...
};
headerInfo getHeaderInfo() const { ... }
};
To copy to clipboard, switch view to plain text mode
Note that the fully qualified name of the struct then becomes readHeader::headerInfo.
Bookmarks