Mail Archives: djgpp/1999/05/16/11:53:10
From: | Unigni <unigni AT zaynar DOT demon DOT co DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | String arrays...
|
Date: | Sun, 16 May 1999 15:01:06 +0100
|
Organization: | Zaynar Productions
|
Distribution: | world
|
Message-ID: | <LOzMxDAi+sP3EwcQ@zaynar.demon.co.uk>
|
NNTP-Posting-Host: | zaynar.demon.co.uk
|
X-NNTP-Posting-Host: | zaynar.demon.co.uk:158.152.90.16
|
X-Trace: | news.demon.co.uk 926868221 nnrp-12:13011 NO-IDENT zaynar.demon.co.uk:158.152.90.16
|
X-Complaints-To: | abuse AT demon DOT net
|
MIME-Version: | 1.0
|
X-Newsreader: | Turnpike Version 3.03a <iYfirxJDTC4cxpT9l8N57y$FY6>
|
Lines: | 18
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I'm making a program which needs to read a mixture of number and words
from a text file. For words, I'd use:
char name[10];
or something like that, to be able to store a word up to 10 characters
long, and read data from the file into this ("dataFile >> name;"). I
also use:
int number;
to be able to read a number. However, when reading more than one lot of
data, I could use:
int number[5];
but what would I do for 'name', and how would I read data into it from a
file?
Any help will be greatly appreciated!
--
Philip Taylor
philip @ zaynar . demon . co . uk
http://www.zaynar.demon.co.uk/atr - Programming robots!
- Raw text -