c++ - Misusing istream& get -


i'm trying make method extracting email info external file , store in string. i'm using .get extract characters, debugger saying: no instance of overloaded function matches argument list. it's saying can't convert third parameter const char[2] char. seems quick fix, i've been playing around parameters , can't seem figure out what's wrong.

current->email_data.sent pointer character array.

also, i'm not sure why code won't indent when paste here.

int classify::load_email(char filename[]) { email_node * current; current = email_head;   ifstream source_file(filename); if(email_head) {     while(current->next) {         current = current->next;     }  } else {     email_head = new email_node; } while(!source_file.eof()) {     source_file.get(current->email_data.sent, 200, "|"); } }; 

in three-parameter overload of basic_istream::get, last parameter single character, not string. replace "|" '|'.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -