class object{ //consider a better name for your class
public:
object();
private:
char mat[40][40];
};
object::obect(){
for(int K=0; K<40; ++K)
for(int L=0; L<40; ++L)
mat[K][L] = ' ';
}
int main(){
object matrix;
}
Thank you guys, i did it like AbstractionAnon said, but now i get this error u_u' :
/tmp/cccLju3V.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text+0xa5): undefined reference to `std::ios_base::Init::Init()'
main.cpp:(.text+0xb4): undefined reference to `std::ios_base::Init::~Init()'
collect2: error: ld returned 1 exit status
That look like some kind of linker error indicating that the linker couldn't find some ios_base stuff. Make sure you have the right headers included in your file and that the linker knows where to look for standard library files.