As others pointed out, this doesn't make too much sense: why don't you just print your text at the beginning of your main method ?
Anyway, I guess there's a way to print something before the main: have a global static variable which is initialized by calling a function:
static int myVar = PrintString();
int PrintString()
{
cout << "My string";
return 0;
}
But I don't see any reason why you would like to do something like that here... Furthermore, if you need this multiple times, there's no way to define the initialization order (if the static variables are in separate compilation units).