You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
cout << "A" << mName << "attacks you with a " << mWeapon.Name << endl
// Put these includes at the top of your source file
#include <sstream> // Yes, you include sstream, the class is named the more verbose 'stringstream' though
// Put this in your main loop or where-ever you might need it
std::stringstream ss; // Declare stringstream object
ss << "A " << mName << " attacks you with a " << Weapon.Name << endl;
dbText(0, 0, ss.str().c_str()); // GDK 1 uses c-strings while GDK 2 employ wrapper functions to use string (the class) input directly
Because Oct(31) = Dec(25)
char buff;//most strings won't be anywhere near this size
sprintf(buff,"A %s attacks you with %s",mName,mWeapon.name);
Login to post a reply