J
julien.durand.1981
hi,
I'm just having a weird problem that I can't explain by myself and
would appreciate someone else's view on this piece of code (used in a
JNI project). Basically if I remove some no-op lines the compiled
library does not produce a valid result (does not load the file). I
suspect that this can come from an error in the compile/linking chain
but can't spot it... Has anyone already face something like that ? :
void Store::load(const string& filename){
ifstream is(filename.c_str(), ios::binary | ios::in);
DataInputStream dis(&is);
Vector v;
bool test;
while(dis>>v){
addVector(v);
//no-op!!!!!!
test=false;
}
is.close();
int i=0;
//no-op!!!!!!!
cout<<dis<<" "<<i<<" "<<" "<<endl;
}
cheers
I'm just having a weird problem that I can't explain by myself and
would appreciate someone else's view on this piece of code (used in a
JNI project). Basically if I remove some no-op lines the compiled
library does not produce a valid result (does not load the file). I
suspect that this can come from an error in the compile/linking chain
but can't spot it... Has anyone already face something like that ? :
void Store::load(const string& filename){
ifstream is(filename.c_str(), ios::binary | ios::in);
DataInputStream dis(&is);
Vector v;
bool test;
while(dis>>v){
addVector(v);
//no-op!!!!!!
test=false;
}
is.close();
int i=0;
//no-op!!!!!!!
cout<<dis<<" "<<i<<" "<<" "<<endl;
}
cheers