fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. void foo( const string * str)
  6. {
  7. }
  8.  
  9. void foo( const string * const str)
  10. {
  11. }
  12.  
  13. int main() {
  14.  
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void foo(const string*)’:
prog.cpp:9:6: error: redefinition of ‘void foo(const string*)’
 void foo( const string * const str)
      ^
prog.cpp:5:6: error: ‘void foo(const string*)’ previously defined here
 void foo( const string * str)
      ^
stdout
Standard output is empty