Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

C++ function

  1. Jun 11, 2008 #1
    I got the following error when I tried to compile some code:

    Code (Text):

    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. jcsd
  3. Jun 11, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper

    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?
  4. Jun 11, 2008 #3
    Yeah, it "looks" fine. Maybe you should post the code and where the compiler cries.
  5. Jun 11, 2008 #4


    User Avatar

    Staff: Mentor

    Grep your sources looking for angle_between, could be it was defined earlier as something else.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook