I have this code:
#include <stdio.h>
int main() {
dosome();
}
char* dosome() {
char* buffer = malloc(sizeof(char) * 128);
gets(buffer);
puts(buffer);
return buffer;
}
I want to return the buffer, so it can be printed, or worked with in the main function in some way. This gives a reutrn type error though I'm aware that gets() is not safe. This is a proof of concept
The error looks as follows simple.c:11:7: error: conflicting types for ‘dosome’ 11 | char* dosome() { | ^~~~~~