Alan Valejo
Alan Valejo

Reputation: 1315

G++ Warning: extra tokens at end of #include directive [enabled by default]

I can't find the problem, anyone know solve?

Code

#include <algorithm>‎
int main(int argc, char* argv[]) {
    return 0;
}

Warning

extra tokens at end of #include directive [enabled by default]

Upvotes: 2

Views: 5569

Answers (1)

Dietmar K&#252;hl
Dietmar K&#252;hl

Reputation: 153792

Looking at the code quoted above using od -c gives this output:

0000000    #   i   n   c   l   u   d   e       <   a   l   g   o   r   i
0000020    t   h   m   > 342 200 216  \n   i   n   t       m   a   i   n
0000040    (   i   n   t       a   r   g   c   ,       c   h   a   r   *
0000060        a   r   g   v   [   ]   )       {  \n                   r
0000100    e   t   u   r   n       0   ;  \n   }  \n   

Note the bytes between the > and the \n: You probably want to get rid of them.

Upvotes: 12

Related Questions