Код: Выделить всё
void ShowText( const String &s )
{
MessageBox( NULL, s.c_str(), "", MB_OK );
}
Вариант 1:
Код: Выделить всё
String str = "Hello world";
ShowText( str );
Код: Выделить всё
ShowText( "Hello world" );
Модераторы: Hawk, Romeo, Absurd, DeeJayC, WinMain
Код: Выделить всё
void ShowText( const String &s )
{
MessageBox( NULL, s.c_str(), "", MB_OK );
}
Код: Выделить всё
String str = "Hello world";
ShowText( str );
Код: Выделить всё
ShowText( "Hello world" );
Код: Выделить всё
ShowText(String("Hello world"))