Main.cc: In function 'int main()':
Main.cc:7:9: error: 'a' was not declared in this scope
if(a[i]==k){
^
Main.cc:7:15: error: 'k' was not declared in this scope
if(a[i]==k){
^
Main.cc:8:10: error: 'first' was not declared in this scope
if(first==0){
^
Main.cc:11:8: error: overloaded function with no contextual type information
end = i;
^
Main.cc:14:5: error: 'first' was not declared in this scope
if(first==0){
^
Main.cc:19:2: error: expected '}' at end of input
}
^