Date: Thu, 11 Nov 1999 23:44:31 +0200 From: Marius Myburg Subject: Please help To: djgpp AT delorie DOT com Message-id: <0FL100CMRYY7ZI@cpt-proxy1.mweb.co.za> MIME-version: 1.0 X-Mailer: Microsoft Internet Mail 4.70.1154 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-MSMail-Priority: Normal X-Priority: 3 Reply-To: djgpp AT delorie DOT com Can anyone please tell me why this program doesn't want to work? It compiler fine, but when I run it, after I have entered the requested text, it returns with an error at the strlength=strlen(string) line. Also, when I remove that line, set string length to say 8 and enter a 8-character string, it returns with an error when I want to access the string's individual characters, at t1 = string[i]. #include #include #include #include char *string; int strlength; void getstring() { clrscr(); printf("%s", "Enter a string > "); scanf("%s", &string); printf("%s", &string); strlength = strlen(string); -- error here }; int scanstring() { char t1; // temp char for (int i=0; i