|
| Null (197) | |
Hello, just a quick question about newWith new[] it's clear. E.g.char *c=new char[23]; // allocating space for 23 chars in memory but how about char *c=new char;I didn't specify how much memory I need so how does this work? | |
| firedraco (2618) | |
It creates a single character. It's the same as:char* c = new char[1]; | |
| helios (6064) | |
| Almost the same. new T[1] should be deleted with delete[], but new T should be deleted with delete. | |
This topic is archived - New replies not allowed.
