-=> Remebering what Cyber Con wrote to All <=-
CC> ok i know how you have some one enter a number
CC> scanf , but will this work for words.
for words, use "gets" function. It will give you a string with spaces, and
words.
e.g.
char s[40];
gets(s);
puts("\r\nThis was the string you entered : "); puts(s);
I suggest you prefer cgets(), and cputs() in conio.h (I mean..thats what I
prefer).
CC> so could someone write me a exp. program that does the following.
Well, are we allowed to discuss QBASIC programs in C++ echo ??
Anyway, the first program inputted a string (name$) from the user,
compared it to "Cyber Con". If it matched, it wrote "Hi Cyber Con" on
screen. Then it opened a file, wrote the string to the file, and closed file.
The second program opened the file, read that string from file, wrote it on
screen, and closed the file.
Please don't post any QBASIC code in this echo in future....I am sure the
moderators will not like it.
MANISH MALIK
blaster@poboxes.com
--- Terminate 5.00/Pro
--- Maximus 3.01
---------------
* Origin: Delhi Online -=[New Delhi/India]=- (6:606/26)
|