c++ - 'new char[]' does not work, but it should -
i had code, returned char* if write in cpp:
char* test_char = new char[size];
all good, if write in header:
char* test_char;
and in cpp:
test_char = new char[size];
the program compiles not run.
what doing wrong?
char = new char[size];
you want
test_char = new char[size];
Comments
Post a Comment