getline is in the GNU C library and is indeed a different function than the STL getline, but since Microsoft apparently
does like buffer overflows, it doesn't seem to be in theirs.

Maybe it's not standard C, I don't really know since I rarely use straight C and not to get input from the console. But fgets is buffer-safe and so probably the most portable option is to use that with stdin.
char buffer[256];
fgets(buffer, 256, stdin);