Get a C-Style String from a C++ String
#include <cstdio> #include <string> using namespace std; int main( ) { string boss( "B" ); printf( "%s is an important man.\n\n", boss.c_str() ); char man[50]; strcpy( man, boss.c_str() ); strupr( man ); printf( "this is a test: %s\n", man ); }