C
Craig
Hello friends at comp.lang.c,
I'm reading from a socket descriptor and copying the data to a buffer using:
char buffer[MAXVALUE];
..
..
nread = read(newSd, line, MAXVALUE);
The string to be copied to the buffer is of varying size, so what I'd like
to know is if there's a way to copy the data, without having to specify a
max value, making the size of the string the same size as the array.
Thanks,
Craig
I'm reading from a socket descriptor and copying the data to a buffer using:
char buffer[MAXVALUE];
..
..
nread = read(newSd, line, MAXVALUE);
The string to be copied to the buffer is of varying size, so what I'd like
to know is if there's a way to copy the data, without having to specify a
max value, making the size of the string the same size as the array.
Thanks,
Craig