fork(4) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class car {
  5. public:
  6. void test() { cout << "test" << endl; }
  7. };
  8.  
  9. int main() {
  10. struct : public car { int price; } fordcar;
  11. fordcar.test();
  12. return 0;
  13. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
test