T
TheBinder
Guest
Hey! Please forgive me if this is the incorrect subforum for this topic!
I have written a program, here:
#include <iostream>
#include <fstream>
#include <istream>
#include <string>
using namespace std;
int loadDictionary(istream& dictfile, string dict[]);
const int MAXRESULTS = 20; // Max matches that can be found
const int MAXDICTWORDS = 30000; // Max words that can be read in
int main() {
string results[MAXRESULTS];
string dict[MAXDICTWORDS];
ifstream dictfile; // file containing the list of words
int nwords; // number of words read from dictionary
string word;
dictfile.open("Words.txt");
if (!dictfile) {
cout << "File not found!" << endl;
return (1);
}
}
int loadDictionary(istream& dictfile, string dict[]) {
int count{};
string line;
while (getline(dictfile, line))
count++;
return count;
}
My words.txt file requires a higher Stack Size, so I increased my Stack Reserve Size to 8mbs; which should be plenty for this program. But it seems that my higher Stack Size isn't being saved/implemented correctly. Any suggestions?
Continue reading...
I have written a program, here:
#include <iostream>
#include <fstream>
#include <istream>
#include <string>
using namespace std;
int loadDictionary(istream& dictfile, string dict[]);
const int MAXRESULTS = 20; // Max matches that can be found
const int MAXDICTWORDS = 30000; // Max words that can be read in
int main() {
string results[MAXRESULTS];
string dict[MAXDICTWORDS];
ifstream dictfile; // file containing the list of words
int nwords; // number of words read from dictionary
string word;
dictfile.open("Words.txt");
if (!dictfile) {
cout << "File not found!" << endl;
return (1);
}
}
int loadDictionary(istream& dictfile, string dict[]) {
int count{};
string line;
while (getline(dictfile, line))
count++;
return count;
}
My words.txt file requires a higher Stack Size, so I increased my Stack Reserve Size to 8mbs; which should be plenty for this program. But it seems that my higher Stack Size isn't being saved/implemented correctly. Any suggestions?
Continue reading...