Hi!, I'm trying to make a lowercase function, the problem here is that, I don't know how can I assign a char array to a pointer, I'm using calloc to alloc the memory for my pointer. Do I need another function to fill that memory ?
This doesn't make any sense. ptext is a pointer to a char, so *ptext is a char. Is text a char? No. So how can you assign the value of text to a char? What are you actually trying to do with that? Are you trying to copy the contents of the array that text points to into the memory you just allocated?
Is there a reason you're doing this using an array of char instead of just using a proper C++ string?
You shouldn't be using calloc or malloc. You should be using new. But actually, you shouldn't be using new, you should be using string, and the algorithm library.
I know I can use tolower functions, or transform, but the case is that this code should work with pointers, also, it has to be a lowercase function. Pointers are very complex...