Okay:
First, you have to declare a buffer with a known size at compile time. You cannot declare a buffer using a variable whose value is determined dynamically while the program is running. That's one of the reason for doing it as
char *Msg = new char [Size];
This basically says that Msg is a pointer to a character, although it will be to a series of characters once the new command is executed. If you just declare
char *Msg;
it's simply a pointer without an assigned address to point to. By using the new command you're asking the operating system to provide some amount of space for a number (Size) of data elements of the size of the type (char) you're specifying. The new command returns a pointer to the memory location of the space that the OS has provided which is then assigned to the pointer (Msg) you're using to reference it.
Several things to keep in mind. You don't ever want to change the pointer value stored in Msg until you've let the system reclaim the memory space allocated (when you're finished with it) using the delete command with
delete [] Msg;
If you're going to traverse the string with a pointer, assign another pointer the same address of the beginning of the string that's found in Msg (for example.)
Now, as for using a statically declared buffer, there's nothing that says that it has to be the same size as the string it's receiving. However, it does need to be at least as large as the string. So create it with a size larger than any known string you expect to find in it and just let it take up the space.
Also remember that character strings typically are terminated with a character of value zero. Any size of a string you request is going to have to allocate enough space for the string characters and the zero terminator.
Lilith, Night Butterfly
I'm not a programmer but I play one in the office