question about dense.cpp
Closed this issue · 3 comments
Thanks for sharing this open source .
Here is a question that when i build this project , run this command 'g++ -std=c++11 dense.cpp -O2 -o dense' and the compiler show this error message 'dense.cpp:189:21: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]' .
I would like to know how to fix this problem .
thanks for watching , sincerely waiting for your reply.
The function “fscanf” has a retrun value which is the number of input items successfully matched and assigned and I don't use this value. It is just a warning, not an error. If you want to remove this warning, you can write it like:
if( fscanf(pointreader, "%lf %lf %lf", &po[i].xyz[0], &po[i].xyz[1], &po[i].xyz[2]); != 3 )
{
printf("error")
}
thanks a lot i'll try it !!
it works !!
thank you so much