fork download
  1. class B
  2. {
  3.  
  4. ....
  5.  
  6. };
  7.  
  8.  
  9. class A
  10. {
  11.  
  12.  
  13. B* BPtr
  14.  
  15. };
  16.  
  17. vector<B>BSet;
  18. vector<A>ASet;
  19.  
  20. void Test()
  21. {
  22. ....
  23. A tempA;
  24.  
  25. tempA.BPtr=&BSet.back();
  26.  
  27.  
  28. ....
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:1: error: expected unqualified-id before ‘...’ token
 ....
 ^
prog.cpp:13:4: error: expected ‘;’ at end of member declaration
 B* BPtr
    ^
prog.cpp:17:1: error: ‘vector’ does not name a type
 vector<B>BSet;
 ^
prog.cpp: In function ‘void Test()’:
prog.cpp:22:1: error: expected primary-expression before ‘...’ token
 ....
 ^
prog.cpp:22:1: error: expected ‘;’ before ‘...’ token
prog.cpp:25:1: error: ‘tempA’ was not declared in this scope
 tempA.BPtr=&BSet.back();
 ^
prog.cpp:25:13: error: ‘BSet’ was not declared in this scope
 tempA.BPtr=&BSet.back();
             ^
prog.cpp:28:1: error: expected primary-expression before ‘...’ token
 ....
 ^
prog.cpp:28:1: error: expected ‘;’ before ‘...’ token
stdout
Standard output is empty