foo.cc:7:1: error: 'queue' does not name a type
queue<data>q;
^~~~~
foo.cc: In function 'int main()':
foo.cc:11:5: error: 'memset' was not declared in this scope
memset(a,' ',sizeof(a));
^~~~~~
foo.cc:12:5: error: 'cin' was not declared in this scope
cin>>m>>n;
^~~
foo.cc:12:5: note: suggested alternative: 'main'
cin>>m>>n;
^~~
main
foo.cc:14:9: error: 'getchar' was not declared in this scope
getchar();
^~~~~~~
foo.cc:14:9: note: suggested alternative: 'char'
getchar();
^~~~~~~
char
foo.cc:15:32: error: 'scanf' was not declared in this scope
for(int j=1; j<=m; j++)scanf("%c",&a[i][j]);
^~~~~
foo.cc:19:16: error: 'q' was not declared in this scope
while(!q.empty())q.pop();
^
foo.cc:22:9: error: 'q' was not declared in this scope
q.push(data{x,y,0});
^
foo.cc:46:9: error: 'cout' was not declared in this scope
cout<<ans1<<endl;
^~~~
foo.cc:46:21: error: 'endl' was not declared in this scope
cout<<ans1<<endl;
^~~~
foo.cc:46:21: note: suggested alternative: 'enum'
cout<<ans1<<endl;
^~~~
enum