C++ code needed

Hello, I need to write a code which would include Main (cpp file), Header (h file). Also, encapsulation is necessary (in private, protected or public zone) and there should be used references and pointers. Anyone who has done similar programs please share all your works, thank you for your time.
"Similar" programs? Every non-trivial program fulfills your requirements.
But here's a simple one:

main.cpp:
1
2
3
4
5
6
7
8
9
10
struct A {};
struct B
{
  B() : c(b) {}  
  A a;
  protected: A* b;
  private: A*& c;
};

int main() {}


main.h:
Sounds like a homework assignment to me. Like a final review of all the topics the class has covered -- so the teacher wants you to write a program that uses all of them.


Do your own homework kthx.
Topic archived. No new replies allowed.