I am trying to read in and combine three files and output it as another file. I know I can do this using system commands, but its just one phase in a larger program. I believe I am using fgets and fputs incorrectly... I am getting an error of
cannot convert `std::string' to `char*' for argument `1' to `char* fgets(char*, int, FILE*)'
and
cannot convert `std::string' to `const char*' for argument `1' to `int fputs(const char*, FILE*)'
I could use some help understanding what I am doing wrong and then maybe if you can a little direction for how to fix it. I want to learn to write my own code so I would prefer help not the actual code, or an example of it being done correctly with a different application or with different file... I don't want to just cut an copy code.... Thanks
I have never used ifstreams or ofstreams before, so I am sure that will take a little time to read and get familiar with, but I definitely appreciate your suggestion. I will check into and try to learn it. I am sure this site has some info on them I can check out. :-)
I am trying to understand this, but I'm having all sorts of trouble... does anyone have sample code from a program that uses the ifstreams and ofstreams and does anything with the data from one to the other?