RE: I Need Help With This Vector Problem 08-09-2019, 11:12 PM
#14
(08-09-2019, 11:04 PM)phyrrus9 Wrote:(08-09-2019, 10:38 PM)Drako Wrote:(08-09-2019, 07:20 PM)phyrrus9 Wrote: which problem was that?
My reply there. Do you at least have an idea on how I can solve it?
Of using cout instead of printf? If it's not a real problem, I wouldn't worry about it. Going forward, if you can stand your codebase being unclean, use printf for new stuff. I was merely curious why you mixed the two
I quoted the wrong post...
I meant my code, and not cout and printf.
Code:
std::vector<int> infectChance = {5, 10, 15, 20, 25, 30, 35, 40, 45}; //List of possible infection chances
std::cout << " 1 > Kin | Location Size: Large | Infection Chance: " << infectChance[0] << "%" << '\n' //Prints everything
<< " Location Description - Kin is the largest location in the region, you'll" << '\n'
<< " probably find lots of loot, but just as many bad guys.\n" << '\n'
<< " 2 > Military Outpost | Location Size: Large | Infection Chance: " << infectChance[1] << "%" << '\n'
<< " Location Description - The government let us down. So does that mean" << '\n'
<< " you can take their stuff now? Hell yes!\n" << '\n'
<< " 3 > Vernal | Location Size: Medium | Infection Chance: " << infectChance[2] << "%" << '\n'
<< " Location Description - A pretty under-developed, rundown town." << '\n'
<< " It's still got stuff though. Maybe.\n" << '\n'
<< " 4 > Mason | Location Size: Medium | Infection Chance: " << infectChance[3] << "%" << '\n'
<< " Location Description - A better more developed Vernal. Go check it" << '\n'
<< " out.\n" << '\n'
<< " 5 > Mavren | Location Size: Small | Infection Chance: " << infectChance[4] << "%" << '\n'
<< " Location Description - OK, lets just make this short and sweet. it's" << '\n'
<< " trailer park. Don't expect a thing.\n" << '\n'
<< " 6 > Return To Bunker\n" << '\n';