Question: How to write the value of the variable to the file.
FPUTS (“Login”, File); I tried simply login without “” fails, the error.
P.S. Newbie 🙂
Answer 1, Authority 100%
If you write on C, do not use STRING
(and use the char *
and functions like STRCMP
). If you write on C++, do not use File *
(and use FSTREAM
).
If you still want to do wrong (string
+ file *
), the situation will correct login.c_str ()
.