K
kent lavallie
Hi. I am an amature c hobbyist and I wish to begin using malloc as I
have been told that running executables from executables is a less
than elegant way to manage memory use. I need basic examples so me and
my compiler can get familliar with malloc. Please give examples that
do not contain nested assignments and the like as I will get lost
quite easily. As an example of my rudimentary style take a look at how
I create an array and assign a pointer to it:
unsigned long arraysize = 50;
char chArray[arraysize];
char *ptrChArray;
ptrChArray = chArray;
I need a few examples of malloc's proper use that are in the same
rudimentary style. Thank you so much for your time. kentinjapan
have been told that running executables from executables is a less
than elegant way to manage memory use. I need basic examples so me and
my compiler can get familliar with malloc. Please give examples that
do not contain nested assignments and the like as I will get lost
quite easily. As an example of my rudimentary style take a look at how
I create an array and assign a pointer to it:
unsigned long arraysize = 50;
char chArray[arraysize];
char *ptrChArray;
ptrChArray = chArray;
I need a few examples of malloc's proper use that are in the same
rudimentary style. Thank you so much for your time. kentinjapan