Hi,I am trying to pass char* buf to the function writeToBuffer,
where I want it to be initialized. It does so, but only for the local variable
myBuffer. buf in main continues to point to null after function returns.
Also, let's assume I have a class member two dimnsinal array
of type e.g. unsigned char** bytes that I would like to initialize dynamically(using for & new e.t.c.)
inside another function like before. How would I go about passing this as a parameter and what should the function arguements on method decleration be?
but this gives a memory write violation, it's wrong :/
I'll have to return a pointer to the buffer and just delete,
or create a new char buffer and then assign mine to it like you showed me.
p.s. I'll definitely read the article you suggested and come back if I have trouble passing a 2d "evil" one as a parameter, unfortunately Im out if time for tonight :(