You can do that in a DGDK program just fine.
It "won't work" if you expect it to read input from the DGDK render window though (hint: c
out -> console
Luckily the concept used here comes from a more abstract datatype than the console stream and thus you can use it with strings. It will require another line to work with the built-in DGDK functions, but you can write your own wrappers to avoid that too if you like.
What you basically want to use are the classes string
You'd use them like so (paste into a set-up and working DGDK program):
// 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
Note that the endl part is irrelevant; DBP (or DGDK) doesn't handle line breaks automatically for you. You can do it easily enough yourself by wrapping the printing function and splitting the string at newline characters though.
Hope that helps give you an idea
"Why do programmers get Halloween and Christmas mixed up?"
Because Oct(31) = Dec(25)