Morning every one
I started to play around with memory allocation in c/c++, now since I didn't have a teacher, I decided to ask these questions as am noob to this part.
Am trying to use this char namez[35] to be assigned to this function getname () per say, now I needed some clarification as to whether am getting this correctly, code goes like this.
First of all, what is ZeroMemory? I don't know.
Second, you need to know more about array and pointer to understand dynamic allocation. You cannot change the fname or namez pointers as they are constant pointers. (Array name is a constant pointer)
Apart from leaking memory, your code is full of errors. It should be something like this-