%dの意味が解りません。
Posted: 2011年3月28日(月) 16:53
ゲームプログラミングの館の第7章で
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
ChangeWindowMode( TRUE ) ; //ウィンドウモードにする。
if( DxLib_Init() == -1 ) return -1; // DXライブラリ初期化処理 エラーが起きたら終了
int a=10,b=20,White;
White = GetColor( 255 , 255 , 255 ) ; // 白色の値を取得
DrawFormatString( 0, 0, White , "a=%d" , a );//文字列表示
DrawFormatString(100,100, White , "a+b=%d" , a+b);//文字列表示
WaitKey() ; // キーの入力待ち(『WaitKey』を使用)
DxLib_End() ; // DXライブラリ使用の終了処理
return 0 ; // ソフトの終了
}
とあったのですが、
%dの意味が解りません。
どなたか教えていただけたら幸いです。
猫でもわかるC++プログラミングを読んだのですが無い様なので・・・。どなたかお願いします。
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ){
ChangeWindowMode( TRUE ) ; //ウィンドウモードにする。
if( DxLib_Init() == -1 ) return -1; // DXライブラリ初期化処理 エラーが起きたら終了
int a=10,b=20,White;
White = GetColor( 255 , 255 , 255 ) ; // 白色の値を取得
DrawFormatString( 0, 0, White , "a=%d" , a );//文字列表示
DrawFormatString(100,100, White , "a+b=%d" , a+b);//文字列表示
WaitKey() ; // キーの入力待ち(『WaitKey』を使用)
DxLib_End() ; // DXライブラリ使用の終了処理
return 0 ; // ソフトの終了
}
とあったのですが、
%dの意味が解りません。
どなたか教えていただけたら幸いです。
猫でもわかるC++プログラミングを読んだのですが無い様なので・・・。どなたかお願いします。