From owner-freebsd-questions Mon Jan 1 3:26:16 2001 From owner-freebsd-questions@FreeBSD.ORG Mon Jan 1 03:26:14 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from OpsyDopsy.net.dhis.org (unknown [213.22.0.13]) by hub.freebsd.org (Postfix) with ESMTP id 235AD37B400 for ; Mon, 1 Jan 2001 03:26:13 -0800 (PST) Received: by OpsyDopsy.net.dhis.org (8.11.1/8.11.1) id f01BRNM01960 for questions@freebsd.org; Mon, 1 Jan 2001 11:27:23 GMT (envelope-from root) From: Joao Fernandes Reply-To: root@OpsyDopsy.net.dhis.org To: questions@freebsd.org Subject: C++ Coding logical error... Date: Mon, 1 Jan 2001 11:18:49 +0000 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <01010111272200.01898@OpsyDopsy.net.dhis.org> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi there. Im not on the questions list, so, if you wish to reply to me, please do so at root@opsydopsy.net.dhis.org. My problem is as follows: I have a string of text data, char *rawdata, and I wanted to 'format' it in an array, char *data[]. One line on each array 'space'. I've tryed this a lot of diferent ways, with no success... Maybe a more experienced programmer may enlighten me. The function I have for formating the data is as follows: ---------------------------------------------------- int filec::format_data() { unsigned int i=0, number_of_characters=0; char *line=NULL; for (i=0; i