How would one add the words.txt along with the libraries in C. My friend told me how to do it in C++, but I'm doing C. #include <words.txt> doesn't work.
1. Whovian's guess is correct.
2. All the background that I can possibly give you: I'm trying to solve http://projecteuler.net/problem=42. Please: no hints or give-aways on how to solve the problem. Just how to use words.txt.
Can't you use that in a loop to check the words one at a time? Or is that one of those functions that are bad and should be avoided? http://www.gidnetwork.com/b-56.html
I must improve on making my question clearer. I'm trying to words.txt in my C program. We #include libraries. But, obviously, #include <words.txt> doesn't work. Then, how do we use words.txt in the program? That's my question.
Sorry for the trouble and thanks for trying to help me out.
Here is the sample how to use words.txt in your program.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
#include <fstream>
usingnamespace std;
int main ()
{
fstream inFile;
inFile.open("words.txt")
int x;
here do a loop or something
inFile>>x;
inFile.close();
return 0;
}