language: C++ 4.7.2 (gcc-4.7.2)
date: 174 days 12 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
void f1(int a, int &b, char r)
{
int one;
one=a;
a++;
b*=2;
r='B';
cout<<a<<b<<r;
cout<<one<<endL;
}
void f2( int &x, int y , char &w )
{
x++;
y=y*2;
w='G';
cout<<x<<y<<w<<endL;
}
void main ()
{
int n1=1 , n2=3;
ch='A';
cout<<n1<<n2<<ch<<endL;
f1(n1,n2,ch);
cout<<n1<<n2<<ch<<endL;
f2(n2,25,ch);
cout<<n1<<n2<<ch<<endL;
}
 
prog.cpp: In function ‘void f1(int, int&, char)’:
prog.cpp:8: error: ‘cout’ was not declared in this scope
prog.cpp:9: error: ‘endL’ was not declared in this scope
prog.cpp: In function ‘void f2(int&, int, char&)’:
prog.cpp:16: error: ‘cout’ was not declared in this scope
prog.cpp:16: error: ‘endL’ was not declared in this scope
prog.cpp: At global scope:
prog.cpp:18: error: ‘::main’ must return ‘int’
prog.cpp: In function ‘int main()’:
prog.cpp:21: error: ‘ch’ was not declared in this scope
prog.cpp:22: error: ‘cout’ was not declared in this scope
prog.cpp:22: error: ‘endL’ was not declared in this scope