to fix the compiler error:
u need to declare the function before u
call it. add the following anywhere before
the call.
void backward(vector <int> vect) ;
a vector is really a dynamically resizeable
array; paasing it by value is not a good
idea at all.
(u are copying a large collection!)
in general, for any user defined type,
prefer passing by const referance instead
of by value. so i would also suggest u
change the signature of backward to
void backward( const vector<int>& vect ) ;
were u not trying to read strings (lines)
from the file (not integers) in the original
post?