/in/foo.c:3:2: error: unknown type name 'using'
using namespace std;
^~~~~
/in/foo.c:3:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
using namespace std;
^~~
/in/foo.c: In function 'print':
/in/foo.c:32:9: error: 'cout' undeclared (first use in this function)
cout<<endl;
^~~~
/in/foo.c:32:9: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:32:15: error: 'endl' undeclared (first use in this function)
cout<<endl;
^~~~
/in/foo.c: At top level:
/in/foo.c:39:7: error: conflicting types for 'print'
void print( int n)
^~~~~
/in/foo.c:28:7: note: previous definition of 'print' was here
void print( char c)
^~~~~
/in/foo.c: In function 'main':
/in/foo.c:48:5: error: 'cin' undeclared (first use in this function)
cin>>n>>d;
^~~
/in/foo.c:72:5: error: 'cout' undeclared (first use in this function)
cout<<endl;
^~~~
/in/foo.c:72:11: error: 'endl' undeclared (first use in this function)
cout<<endl;
^~~~