How to move a struct into a class?
- by Kache4
I've got something like:
typedef struct Data_s {
int field1;
int field2;
} Data;
class Foo {
void useData(Data& data);
}
Is there a way to move the struct into the class without creating a new class? Currently, just pasting it inside the class and replacing Data with Foo::Data everywhere doesn't work.