wchar_t is the data type for unicode, at least within Windows environment. If you don't know what unicode is, perhaps you should read up about it on wikipedia or such...
size_t is a data type used by the C++ Standard Library. It's generally a "reserved" type returned by some functions and shouldn't be cast, if possible.
memcpy is a function that copies n bytes of memory from one location to another. Generally avoided in C++ since it's more a C function.
realloc takes an existing allocation from malloc and resizes it to the new specified size. If it can't expand the current memory block, it allocates a new region of the specified size, copies data over and frees the old one. Is not to be used with new/delete. Avoid if possible. Use only with malloc/free.