[Tex/LaTex] \includegraphics caused missing number, treated as zero error

errors

I was trying to include an image in my file but this error came up:

! Missing number, treated as zero.
<to be read again> 
                   o
l.207               \includegraphics{rate\_of\_return}

I've looked everywhere and tried a lot of things, but the problem remains unresolved.

This is my code:

% ... some stuff

\item[c)] \hfill \\
    In the graph below, the full line is for 7\%, the long-short dashed
    line is for 6\%, and the regular dashed line is for 5\%.
        \includegraphics{rate\_of\_return}

% ... some stuff

Best Answer

You don't have to escape underscores in file names. So you should use \includegraphics{rate_of_return}. Same happens with other file commands like \input, \include or \includeonly.

You need to escape underscores when you want to type _ in the middle of your text.