- 399 名前:名前は開発中のものです。 [2009/09/16(水) 12:40:34 ID:agcxS8EX]
- 助けてください!string型の文字列を出力するにはどうすればいいんでしようか?
DrawFormatStringで試してみましたが無理でした #include "DxLib.h" #include <string> using namespace std; int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ) { ChangeWindowMode(TRUE);//ウィンドウモード if(DxLib_Init() == -1 || SetDrawScreen( DX_SCREEN_BACK )!=0) return -1;//初期化と裏画面化 //ループ開始 while(ProcessMessage()==0 && ClearDrawScreen()==0 ){ //ココ↓// class message { public: string k[30];//string配列30個を用意 }; message mes1;//messageクラスmes1を作成 mes1.k[2]="a";//メンバに代入 DrawFormatString( 50 , 15 , 65535 , "要素2は%s" , mes1.k[2]) ; //ココ↑// ScreenFlip(); } DxLib_End(); return 0; }
|

|