По сути он должен вывести массив, однако компилятор выдает
<stdin>:8:8: warning: unused variable 'massive' [-Wunused-variable]
int massive[] = {1,2,3};
^
<stdin>:11:18: error: no member named 'massive' in 'Something'
cout << this->massive;
~~~~ ^
<stdin>:13:2: error: expected unqualified-id
},
^
1 warning and 2 errors generated.
а вот сам код:
#include <iostream>
using namespace std;
class Something {
public:
Something() {
int massive[] = {1,2,3};
}
void function() {
cout << this->massive;
}
},
int main(int argc, char *argv[]) {
Something s;
s.function();
return 0;
}