Text File

How do you make a text file for a program? I know you use like notepad but what do you put in the text file. Like if I want a ljst of words for a hangman game, do I have just list the words or so I have to put it in c++ code form
closed account (j3Rz8vqX)
Not sure what you are asking.

Is it to make a c++ application using notepad or have a c++ application that operates on a text file?
I made a hangman game and instead of listing 100 words in the actual program I want to call a text file thatbhas the words in it
closed account (j3Rz8vqX)
You can just list the words.
http://www.cplusplus.com/doc/tutorial/files/

The program can read in ascii and binary; not a problem.

Parse it with space or newline.

File>>aString;//takes a string from file, delimited by space and newline.
getline(File,aString);//takes a whole line from file, delimited by newline; can simply be a single word - dependent on how you inserted data into your text file.
Ah thank you
Topic archived. No new replies allowed.