The more Cish way would be
char* foo = malloc(someDynamicAmount * sizeof *foo);
referencing the variable and not the type so that the type isn’t needed.
And without casting the result of malloc (which is C++ish).
The more Cish way would be
char* foo = malloc(someDynamicAmount * sizeof *foo);
referencing the variable and not the type so that the type isn’t needed.
And without casting the result of malloc (which is C++ish).