C++ Error: Underscores in Function Names

  • #1
2,020
1
I got the following error when I tried to compile some code:

Code:
error: `angle_between' cannot be used as a function

I changed the function name to "function1" and it compiled. Since when did C++ not like underscores in function names?
 
  • #2
The underscore isn't a problem ( although leading and trailing ones can cause issues)
Are you sure you haven't got a angle_between() typo somewhere ?

Can you post the line the compiler complains about?
 
  • #3
Yeah, it "looks" fine. Maybe you should post the code and where the compiler cries.
 
  • #4
Grep your sources looking for angle_between, could be it was defined earlier as something else.
 

Suggested for: C++ Error: Underscores in Function Names

Replies
2
Views
488
Replies
3
Views
999
Replies
39
Views
2K
Replies
2
Views
677
Replies
2
Views
510
Replies
6
Views
6K
Replies
16
Views
978
Replies
14
Views
3K
Back
Top