View Single Post
Old Jun 23rd, 2006, 10:32 AM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
It isn't a matter of insight. Which question did you ask that you didn't see an answer for?
Quote:
What is the * operater doing in the array declaration?
It's probably to remind the coder that the total number of elements declared represents a partitioning of m x n.
	memcpy((cTemp + 120), G_cMsgList, 120*49);
	memcpy(cTemp, cMsg, strlen(cMsg));
	memcpy(G_cMsgList, cTemp, 120*50);
The first statement moves the message list into the temp area 120 bytes down from the beginning. The second statement moves cMessage to the beginning of the temp area (before the old message list). The third statement replaces the old message list with the new arrangement. This puts new messages at the front of the list, not at the rear. Capish?
Quote:
i don't understand is why the the declaration for a string is char * cMsg;.
As mentioned above, char *thangy, char* thangy, and char * thangy are equivalent.

Okay?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote