foo.cc:10:20: error: 'vector' has not been declared
     int numIslands(vector<vector<char>>& grid) {
                    ^~~~~~
foo.cc:10:26: error: expected ',' or '...' before '<' token
     int numIslands(vector<vector<char>>& grid) {
                          ^
foo.cc: In member function 'int Solution::numIslands(int)':
foo.cc:12:13: error: 'grid' was not declared in this scope
         row=grid.size();    
             ^~~~
foo.cc:12:13: note: suggested alternative: 'void'
         row=grid.size();    
             ^~~~
             void
foo.cc:24:21: error: 'queue' was not declared in this scope
                     queue<point> q;
                     ^~~~~
foo.cc:24:32: error: expected primary-expression before '>' token
                     queue<point> q;
                                ^
foo.cc:24:34: error: 'q' was not declared in this scope
                     queue<point> q;
                                  ^