Im pretty new to C. And i was stumbeling on %m in scanf when i was trying to build a function similar to input() in Python3.
And i tried it and it worked i i dont know why. The code:
void *input(char *startStr){
char *str;
printf(startStr);
scanf("%m[^\n]", &str);
return str; }
The %m doesn't seem to be a standard specifier in C. My dev environment is on Ubuntu with gcc 6.2.0?
Any Captain here that could explain it for me?
And thank you for being Awesome people on this community!
EDIT: We can close this question, all the links provided will explain it, and there's a similar question asked, that didn't show up when i searched StackOverflow for my problem. But now i'm enlightened in this question, and i hope all others in their hunt for enlightenment will follow the links provided to get their answer in this particular domain of specifiers for scanf.
difference between %ms and %s scanf