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

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -