encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:3:2: error: 'vector' was not declared in this scope
vector<int> masks;
^~~~~~
encoder.cpp:3:2: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
from encoder.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:216:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
encoder.cpp:3:9: error: expected primary-expression before 'int'
vector<int> masks;
^~~
encoder.cpp:9:14: error: 'masks' was not declared in this scope
if(x == 6) masks.push_back(j);
^~~~~
encoder.cpp:12:7: error: 'mask' was not declared in this scope
if((mask[x] & 1 <<j) && !(mask[y] & 1<<j)){
^~~~
encoder.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:4:2: error: 'vector' was not declared in this scope
vector<int> masks;
^~~~~~
decoder.cpp:4:2: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
from decoder.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:216:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
decoder.cpp:4:9: error: expected primary-expression before 'int'
vector<int> masks;
^~~
decoder.cpp:10:14: error: 'masks' was not declared in this scope
if(x == 6) masks.push_back(j);
^~~~~
decoder.cpp:12:5: error: 'mask' was not declared in this scope
if(mask[q] & 1<<h){
^~~~
decoder.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^