Getting a function to return a string
I'm trying to get a function to return a string with some user details in it, to a generic function that'll write it to a file. Does anyone know how to do this? My compiler doesn't like it when I do this
Code:
char Variable[100](int one, char two[20])
Or does anyone know how to return more then one integer?
An Information w.r.t Arrays
You cannot pass arrays across functions and you cannot return the same.
1) You could do good to make the array as part of a structure / class and then return the object of the struct / class
2) You could dynamically allocate memory for the array and return the starting address of the array and receive the same using a pointer