foo.cpp: In function 'int main()':
foo.cpp:4:2: error: 'string' was not declared in this scope
string a,b;
^
foo.cpp:4:9: error: expected ';' before 'a'
string a,b;
^
foo.cpp:6:10: error: 'cin' was not declared in this scope
getline(cin,a);
^
foo.cpp:6:14: error: 'a' was not declared in this scope
getline(cin,a);
^
foo.cpp:6:15: error: 'getline' was not declared in this scope
getline(cin,a);
^
foo.cpp:7:14: error: 'b' was not declared in this scope
getline(cin,b);
^
foo.cpp:15:38: error: 'cout' was not declared in this scope
if(a[0]==b[i]&&b[i+sizeof(a)]==' ')cout<<i<<endl;
^
foo.cpp:15:47: error: 'endl' was not declared in this scope
if(a[0]==b[i]&&b[i+sizeof(a)]==' ')cout<<i<<endl;
^
foo.cpp:22:2: error: 'cout' was not declared in this scope
cout<<count-1;
^