|
-
May 9th, 2001, 02:09 PM
#1
Thread Starter
Hyperactive Member
letter onto a string
Should be quite simple this...
I'm doing some C coursework (using Borland), and I've read a character from a text file. I now want to put the letter onto the end of the string, but everytime I keep getting the same error. I've tried using strcat but that doesn't work either.
Heres the basics of the code
char letter;
char reading[30];
FILE *fp;
fp=fopen("names.txt","r");
letter=fgetc(fp);
strcat(reading,letter);
Can anybody tell me what the problem is and how I can get this working.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|