fstream problem

Hey guys,

i am new to programming and want to make my first helpful program using ftsream, i want to make a config creator for Counter-Strike:Source but i have a problem:

This should be in the text file when it is done:
alias primary "buy primary"

The word "primary" in bold in the text file is determind by what user inputs erlier in the program.

However the problem is that c++ wont let me use "" in cout and i still want the primary to change to what the user wants even though it is in "" with "buy" ("buy primary")

the Primary should change to what the user inputs erlier in the program.

Heres what i came up with:
BuyBot is the name of the text file

buybot << "alias" << "primary" << ""buy" << primary" << "\n";

the code in bold is my problem,

thanks for the help :)
i hope you can understand cause it was hard to explain!!







Last edited on
Oh, brother. Hadn't seen such a basic question in a long time.
Is this what you want to do?
buybot << "alias" << "primary" << "\"buy" << primary << "\"\n";
Last edited on
Thanks mate it worked !
Topic archived. No new replies allowed.