Hi,
i have a problem with getline function in cpp program on os x
Error:
main.cpp:158: error: 'getline' was not declared in this scope
i read that in os x are some issues with getline() function but i am newbie and i dont know what to do.
is possible to change compiler or...when i run program on ubuntu it runs ok but on mac i receive this error.
Thanks for help.
here is the code:
do {
printf("Napis cestu:");
} while ((readd = getline(&posielam, &len, stdin)) == -1);
if (readd > 0)
posielam[readd - 1] = '\0';