I'm trying to insert a string into my stringstream but I'm getting errors. Any thoughts?
Code://Dustin Nicholes //CS 240 //LinkedList driver class #include "stopWord.h" #include "URL.h" #include <fstream> #include <iostream> #include <sstream> #include <stdlib.h> using namespace std; int main(int argc, char* argv[]) { //Get the arguments from the command line string startURL(argv[1]); string outputFile(argv[2]); string stopFile(argv[3]); //Send the start URL to a class that determines if it is HTML and can also do things like determine the Absolute URL //This is also where the robot filiter is started from URL url(startURL); //Open the stop words file fstream file; file.open(stopFile.c_str()); stopWord::stopWord(file); //Setup the structure that will contain unprocessed URLs stringstream URLsToProcess; URLsToProcess<<startURL; //THIS LINE WON'T WORK!! //While we still have unprocessed URLs, Process them! string currentURL; while(currentURL<<URLsToProcess) { //Create a class that can parse the words, headers, new URLs, etc... PageParser parser(currentURL, stopWords); /* //Create a new page Page* page = new Page(parser); if(pages doesn't contain this new page already) { //Add the new page to the data structure containing all of the processed pages pages.add(page); //Retrieve all of the new URLs from the page and add them to the pseudo queue URLsToProcess<<parser.getNewURLs; } */ } //Write the file to XML std::ofstream outFile(outputFile); //XMLwriter output(pages, startURL); //output.writeOut(outFile); return 0; }