array[idx++] = text;



You are assigning your pointers to the same address.

So its not that you will get nothing.

They will all point to the last line entered from your file.