c++ - Link List - no operator '<<' matches -
my c++ poor. anyhow code snippet bellow why error on << in while loop when outside of no error. error is: no operator "<<" matches these operands. string w picks word fine. read somewhere may have overload why? , how on load link list. in advance.
void print() { hashtable *marker = headone; hashtable *inlist; for( int = 0; < tablesize; i++ ) { cout << << ": " << marker->number << endl; if(marker->child != null) { inlist = marker; { string w = inlist->word; cout << w << endl; inlist = inlist->child; } while(inlist != null); } marker = marker->next; }//end loop }
in order able cout
std::string
have include:
#include <string> #include <iostream>
Comments
Post a Comment