I am trying to create a new integer array which is derived from a string of characters. For example :
char x[] = \"12334 23845 32084\"; int y[] = { 12334,
Typically, you require the caller to pass in the result array.
void splitString( const char string[], int result[], int n) { //.... }
This is advantageous because the caller can allocate that memory wherever they want.