Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

NIOS II and overloaded functions in C++

Hi, hope the forum will continue :-)

I would like to use overloaded functions. Feature given by C++

but With NIOS II IDE 9.0 sp2, overloaded functions don't seem to work.

Can anyone confirm that ? OR where i am wrong ?

Is this a future feature ?

an example to explain (from http://www.codersource.net/cpp_tutorial_fu...erloading.html) (http://www.codersource.net/cpp_tutorial_function_overloading.html))

   //C++ Tutorial - Sample code for function overloading
    void AddAndDisplay(int x, int y)
    {
       ...
    }
    void AddAndDisplay(double x, double y)
    {
        ...
    }
    void AddAndDisplay(float x, float y)
    {
       ...
    }
    void AddAndDisplay(float x, float y, float z) // that is near my goal : keep the same function name and add an argument
    {
       ...
    }

Regards.
No RepliesBe the first to reply