#include<vector>
#include<fstream>
#include<sstream>
#include<iostream>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
void print(const vi&)
void input(vvi&);
bool findvec(const vvi&, vi&);
int main(){
vvi matrix;
input(matrix);
vi vecio;
if(findvec(matrix, vec))
print(vec);
}
void print(const vi&v){
for(int i=0; i<v.size():++i)
cout<<v[i]<<" ";
cout<<"\n";
}
void input(vvi&m){
istream in("abc.in");
int n,t; in>>n;
m.resize (n);
for(sting s; n-- && getline(in, s);)
for(istringstream sin(s) ; sin>>t; m[m.size()-n-1].push_back(t));
}
bool findvec(const vvi& matrix, vi& v){
for(int i=0; i<matrix.size(); ++i)
for(int j=0; j<matrix[i].size(); ++j)
if(matrix[i][j]==-1){
v= matrix[i];
return true;
}
return false;
}
运行之后出现这一景观,请大虾 help me !!!
warning C4518: 'void ' : storage-class or type specifier(s) unexpected here; ignored error C2146: syntax error : missing ';' before identifier 'input'
fatal error C1004: unexpected end of file found
加了分号的话,下面就会冒出更多错误了