Hirdetés

Új hozzászólás Aktív témák

  • Protezis

    őstag

    Lenne egy problémám operator overloadinggal kapcsolatban C++-ban:

    Kollekcio.h-ban:
    ...
    friend Kollekcio operator+ (const Kollekcio &koll, const Konyv &elem);
    ...

    Kollekcio.cpp-ben:
    ...
    Kollekcio operator+ (const Kollekcio &koll, const Konyv &elem) {
    Kollekcio koll2(koll); //copy konstruktor meghívása
    koll2.elemHozzaad(elem); //bővíti a Konyv típusú elemmel
    return koll2;
    }
    ...


    A művelet, amit elvégeznék:
    Kollekcio A = Kollekcio B + Konyv I;
    A VC++ 6 internal compiler error hibát dob a header fájlban lévő sorra mutatva:

    fatal error C1001: INTERNAL COMPILER ERROR
    (compiler file 'msc1.cpp', line 1786)
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information
    Error executing cl.exe.



    Mi a baja vele? :F

Új hozzászólás Aktív témák