I’m quite new to Linux programming.
I’m compiling a simple C++ code using g++:
#include“recip.hpp”
#include<cassert>
double recip (int i) {
// I should be non-zero.
assert (i != 0);
return 1.0/i;
}
The file recip.hpp exists in my current directory. I don’t understand why I’m getting an error:
recip.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
What’s wrong?
The compiler is not a text editor, nor a human – it checks for exact character code match, not for visual similarity… You have to use
using the standard double quotation marks.