//自分がデバッグ時に使うために作った
//メッセージボックス
//値の内容を見たいときに便利かも?


#include <stdio.h>

void MsgBox(int i){
	char buff[64]="";
	sprintf(buff,"%d",i);
	MessageBox(NULL,buff,"int",MB_OK);
}

void MsgBox(unsigned int i){
	char buff[64]="";
	sprintf(buff,"%u",i);
	MessageBox(NULL,buff,"unsigned int",MB_OK);
}

void MsgBox(long i){
	char buff[64]="";
	sprintf(buff,"%ld",i);
	MessageBox(NULL,buff,"long",MB_OK);
}

void MsgBox(unsigned long i){
	char buff[64]="";
	sprintf(buff,"%lu",i);
	MessageBox(NULL,buff,"unsigned long",MB_OK);
}

void MsgBox(float i){
	char buff[64]="";
	sprintf(buff,"%f",i);
	MessageBox(NULL,buff,"float",MB_OK);
}

void MsgBox(double i){
	char buff[64]="";
	sprintf(buff,"%lf",i);
	MessageBox(NULL,buff,"double",MB_OK);
}

void MsgBox(char i){
	char buff[2]="";
	buff[0]=i;
	MessageBox(NULL,buff,"char",MB_OK);
}

void MsgBox(char*i){
	MessageBox(NULL,i,"char*",MB_OK);
}

void MsgBox(bool i){
	MessageBox(NULL,(i ? "TRUE" : "FALSE"),"bool",MB_OK);
}



▲トップページ > Windows と C++