M
Mark van Heeswijk
Probably a very basic question but i'm new to c++
What's the most efficient (mem) way to copy string 'a' to string 'b'? Now i
do:
char a[1000];
char* b; // length not known...could be 1000
strcpy(a, b);
Is it really necessary that 'a' always gets allocated the max size of 'b',
or can this be done more efficiently?
Thanks in advance,
Mark
What's the most efficient (mem) way to copy string 'a' to string 'b'? Now i
do:
char a[1000];
char* b; // length not known...could be 1000
strcpy(a, b);
Is it really necessary that 'a' always gets allocated the max size of 'b',
or can this be done more efficiently?
Thanks in advance,
Mark