So the first obvious problem here is in "get_string", Eclipse(A linux C SDK) is telling me that "passing argument 1 of ‘fgets’ makes pointer from integer without a cast".
char name, bday;
printf("Introduza o Nome do contacto:\n");
printf("%s", name); // This is just for test purpose
void get_string(char *string_to_get, size_t string_size)
fgets(*string_to_get, string_size, stdin);
for(i=0; i<string_size; i++)
I've got no idea of what it means, I've googled it though, found many things about it but I didn't managed to figure it out by myself.
The code compiles flawlessly, but when I use criar_contacto() which calls get_string() my app just terminates. My main() is just a switch case to create a menu where each case calls a fuction.
My get_string is suposed to get a string with fgets and then cut the "\n" from it, so I don't always have to write the loop to have it done.
I'm trying to make a "notebook for cell phone numbers" (I'm portuguese so I guess that's not what you guys call it, but i hope you get it).
Thanks in advance,