C++ function

  • C/++/#
  • Thread starter ehrenfest
  • Start date
  • #1
2,012
1

Main Question or Discussion Point

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?
 

Answers and Replies

  • #2
mgb_phys
Science Advisor
Homework Helper
7,774
12
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
192
0
Yeah, it "looks" fine. Maybe you should post the code and where the compiler cries.
 
  • #4
Borek
Mentor
28,326
2,710
Grep your sources looking for angle_between, could be it was defined earlier as something else.
 

Related Threads for: C++ function

  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
7
Views
3K
  • Last Post
Replies
12
Views
7K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
6
Views
6K
  • Last Post
Replies
5
Views
2K
  • Last Post
2
Replies
31
Views
4K
Top