I have just begun learning pointer operations, and am attempting to create a function that will reverse a string. For some reason, however, revString is always allocated with an extra 4-5 bytes. The code is below, and I would appreciate anyone's help.
char *strrev(char *string)
{
int...
I have a small class that I'd like to be able to write data to. However, whenever I invoke the write function, I receive an error upon deallocation. I know I'm doing something wrong with memory management (because it works fine for my character arrays), but I can't seem to figure out what. I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.