Search code examples
c++ambiguous

c++ compilation error: call of overloaded ‘<function_name>(char*&)’ is ambiguous


I'm trying to convert a code in C to C++ language and I get an error but I've no idea what's the source of the problem.

here is the source code: http://pastebin.com/PnKvgNsR

The error message is:

call of overloaded ‘dateTimeToMinutes(char*&)’ is ambiguous

Compiling with g++4.7.1 (included c++11 standard).


Solution

  • In your cpp file specify the namespace RabQavSystem in your definitions of dateTimeXXX functions.

    int RabQavSystem::dateTimeDifference(DateTime datetime1, DateTime datetime2) 
    {
        ...
    }
    
    int RabQavSystem::dateTimeToMinutes(DateTime datetime)
    {
        ...
    }