Computer Science, asked by godamjaan, 1 year ago

how to define structure in a class in c++

Answers

Answered by tanvirzohan1pdi9kc
1

class C {

// struct will be private without `public:` keyword

struct S {

// members will be public without `private:` keyword

int sa;

void func();

};

void func(S s);

};

Similar questions