prog.cpp:9:9: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
Logar(k)
^
prog.cpp:10:3: error: ‘a’ was not declared in this scope
{a = k;
^
prog.cpp:10:8: error: expected ‘}’ before ‘;’ token
{a = k;
^
prog.cpp:10:8: error: in C++98 ‘k’ must be initialized by constructor, not by ‘{...}’
prog.cpp:10:8: error: no matching function for call to ‘Logar::Logar(<brace-enclosed initializer list>)’
prog.cpp:10:8: note: candidates are:
prog.cpp:7:3: note: Logar::Logar(int)
Logar(int z);
^
prog.cpp:7:3: note: no known conversion for argument 1 from ‘<type error>’ to ‘int’
prog.cpp:3:7: note: Logar::Logar(const Logar&)
class Logar
^
prog.cpp:3:7: note: no known conversion for argument 1 from ‘<type error>’ to ‘const Logar&’
prog.cpp:11:3: error: expected unqualified-id before ‘if’
if(a == 040)
^
prog.cpp:13:2: error: expected declaration before ‘}’ token
}
^