Home c++ Variable value in FPUTS C++

Variable value in FPUTS C++




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 () .

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions