|
-
March 25th, 2010, 09:07 PM
#10
Re: Combine Two Buffers - How To?
Crazy idea: Why don't you declare buff1 & 2 like this?
Code:
char Buf[2048]; //Declare as 2048, use only 1024 for buf 1
const char* Buf2 = Buf + 1024; //Use Buf's other 1024 chars.
There, only one buffer, and the rest of the code should work (I didn't see any "sizeof", so there is probably nothing to worry about you array decaying into a pointer, that and buf and buf2 have the same scope).
But at this point, I think you should really tell use what and why you are trying to achieve, rather than how ("use only 1 buffer" is an answer to a how question).
So, what are you trying to achieve?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|