/in/foo.c:2:1: error: unknown type name 'using'
using namespase std;
^~~~~
/in/foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
using namespase std;
^~~
/in/foo.c:3:1: error: unknown type name 'class'
class Time
^~~~~
/in/foo.c:4:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
/in/foo.c: In function 'main':
/in/foo.c:41:2: error: 'cin' undeclared (first use in this function)
cin>>h>>m>>s;
^~~
/in/foo.c:41:2: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:43:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cin'
cin>>num;
^~~
/in/foo.c:43:8: error: 'num' undeclared (first use in this function)
cin>>num;
^~~
/in/foo.c:44:2: error: unknown type name 'Time'
Time time;
^~~~
/in/foo.c:45:6: error: request for member 'init' in something not a structure or union
time.init(h,m,s);
^
/in/foo.c:46:6: error: request for member 'add' in something not a structure or union
time.add(num);
^
/in/foo.c:47:6: error: request for member 'print' in something not a structure or union
time.print();
^
/in/foo.c:44:7: warning: variable 'time' set but not used [-Wunused-but-set-variable]
Time time;
^~~~