c++ - "no matching function for call to : " compiler error -
class zbiornik { public:     zbiornik(int rozmiar)     {         int liczby[rozmiar];     } }; in code:
zbiornik cyfry; cyfry = liczby; can explain how fix main.cpp:67:10: error: no matching function call 'zbiornik::zbiornik()' , why it's happening?
i can't figure out missing, appreciated,
since defined user-defined constructor, implicit default constructor not generated compiler. idea wouldn't right thing if implicitly generated since have user-defined ctor. therefore, have define yourself:
zbiornik(){...} however, have mutiple problems cyfry = liczby; , int liczby[rozmiar]; not compile , don't know trying lines.
for one, rozmiar cannot used in constant expression.
Comments
Post a Comment