>>566
fgets使えよ
#define NUM 32
char *pInput = NULL;
int Count = 0;
while ((pInput = realloc(pInput, (Count + 1) * Num)) != NULL)
{
    char *p;
    if (!fgets(pInput + Count * NUM, NUM, stdin))
        break;
    p = strchr(pInput + Count * NUM, '\n');
    if (p)
    {
        *p = '\0';
        break;
    }
    Count++;
}