c++ - Reading from file using as parameter char* -


I am using a function that uses the char * parameter; I'm reading from a file for input here. My code is:

  std :: ifstream infile ("file.txt"); Std :: string line; While (std :: getline (infile, line)) {if (pass (line.c_str ()) == 0) cout & lt; & Lt; "That's right" & lt; & Lt; Line & lt; & Lt; Endl; }  

is the pass function

  int pass (four * a); // compare c_string with hidden c_string // if return after 0, and 1 to  

I'm compiling using G ++ -C 6.cpp And error is:

Post text "itemprop =" text "> < P> Change to:

  Intimate pass (Const char * a);  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -