why is it not pulling up the text from online source?
I have tried using get/put to use a copy of the text on the internet with no avail but however I am still getting an error as well I am having an issue creating the part that calls the parts of the function together that ask ASCIIsum, Double space delete, and the word counter into the function should I have an extra section that calls these functions and if so how do I construct it properly?
Code:
int getput()
{
string what goes here????;
fstream streamObject("http://www.gutenberg.org/cache/epub/1342/pg1342.txt");
fstream localFile("pap.txt");
fstream newFile("new.txt");
if(streamObject.fail())
cout << "file failed to load." << endl;
else
cout << "file load was successful." << endl;
if(localFile.fail())
cout << "file2 failed to load." << endl;
else
cout << "file load was successful." << endl;
while(!streamObject.eof())
{
streamObject.put(localFile.get());
}
streamObject.close();
char single = localFile.get();
while(!localFile.eof())
{
what goes here???? += single;
single = localFile.get();
}
localFile << newFile;
localFile.close();
asciistring(what goes here????);
doubledelete(what goes here????);
numberwordsinstring(what goes here????);
return 0;
}