Hmm. You could create functions like this
Code:
const char *c(std::string &str) {
return str.c_str();
}
const char *c(const char *c) {
return c;
}
and call them like "p c(whatever)". ("p" is short for "print".) It would work for C++ strings and char[] strings.
Other than that, I can't think of any shorter way to do it at the moment.
A few other things you might want to know: "$" evaluates to the previous result, $$ to the one before that. And you can use $N to access a specific result. (Notice that whenever you print something, it gets a number? Well, you can use $14 or $20 or whatever to get that exact value.)