From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J." Subject: returning strings until no strings are left ? Date: Mon, 16 Dec 2002 21:46:02 +0100 (CET) Sender: linux-c-programming-owner@vger.kernel.org Message-ID: References: Mime-Version: 1.0 Return-path: In-Reply-To: List-Id: Content-Type: TEXT/PLAIN; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-c-programming@vger.kernel.org Hello, I am new to c programming but not new to programming in general . The ``minor'' problem I keep running into at this moment: I know how to return ONE string from a function. But what if I want to keep returning strings from a function until there are no strings left to return ? What should the function than return ? Because the function should always return something in the end and of course the caller has to know that the function is done or has nothing more to return . for example fgets returns NULL when it's done, but if I try to return a NULL at the end of my function while I claimed it as an char *... hmmzzz, status epilepticus... Thank you in advance... J.