fork(3) download
  1. #include <iostream>
  2. int sum(int a, int b);
  3. int main(){
  4. int a = 2, b = 3, c, d;
  5. с = sum(a, b);
  6. cin >> d;
  7. cout << sum(c, d);
  8. return 0;
  9. }
  10. int sum(int a, int b){
  11. return (a + b);
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:5:1: error: stray '\321' in program
 с = sum(a, b);
 ^
prog.cpp:5:1: error: stray '\201' in program
prog.cpp: In function 'int main()':
prog.cpp:5:4: error: expected primary-expression before '=' token
 с = sum(a, b);
    ^
prog.cpp:6:1: error: 'cin' was not declared in this scope
 cin >> d;
 ^
prog.cpp:6:1: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.9/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
prog.cpp:7:1: error: 'cout' was not declared in this scope
 cout << sum(c, d);
 ^
prog.cpp:7:1: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.9/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
stdout
Standard output is empty