error: no matching function for call to `Anton::Anton(Anton)`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following code snippet will generate the compiler message quoted in
the subject line. However, things worked fine with gcc 2.95.3. What's the
reason for this and is there any general solution to work around this?

regards,

eric

--- snip ---

class Anton
{
  public:
    Anton()
    {
       // init code
    }
    Anton(Anton &a)
    {
      // some code wich _needs_ to modify a
    }
};

int main (int, char **)
{
  Anton a[] = {
    Anton(),
    // ...
    Anton()
  };
}


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux