Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualYoubar

Posted 01 December 2012 - 04:15 AM

string day1_c_1 = "You, along with your " << rs_q_c << " friends, set up camp outside of town. You carried " << rs_q_f << " units of food with you, along with another " << rs_q_m << " units of metal.";

The variables rs_q_letter is a number. I'm wondering if I could pack them all into a sentence like the above, which produces a compile error, or do I have to do each quote separately?
So instead of the above, I'd have to do:
string day1_c_1 = "You, along with your ";
string day1_c_2 = " friends, set up camp outside of town. You carried ";
string day1_c_3 = " units of food with you, along with another ";
string day1_c_4 = " units of metal.";
And then print it out like this:
cout << day1_c_1 << rs_q_c << day1_c_2 << rs_q_f << day1_c_3 << rs_q_m << day1_c_4

EDIT:
Variables:
int rs_q_f = 0; //Food
int rs_q_m = 0; //Metal
int rs_q_c = 0; //Companions

#1Youbar

Posted 01 December 2012 - 04:14 AM

string day1_c_1 = "You, along with your " << rs_q_c << " friends, set up camp outside of town. You carried " << rs_q_f << " units of food with you, along with another " << rs_q_m << " units of metal.";

The variables rs_q_letter is a number. I'm wondering if I could pack them all into a sentence like the above, which produces a compile error, or do I have to do each quote separately?
So instead of the above, I'd have to do:
string day1_c_1 = "You, along with your ";
string day1_c_2 = " friends, set up camp outside of town. You carried ";
string day1_c_3 = " units of food with you, along with another ";
string day1_c_4 = " units of metal.";
And then print it out like this:
cout << day1_c_1 << rs_q_c << day1_c_2 << rs_q_f << day1_c_3 << rs_q_m << day1_c_4

PARTNERS