開発環境 |
Microsoft Visual C++ 2010 Express (SP1) |
実行環境 |
Microsoft Windows XP Home Edition (SP3) |
プロジェクトの種類 |
Win32 コンソール アプリケーション |
プロジェクト名 |
test |
アプリケーションの種類 |
コンソール アプリケーション |
追加のオプション |
空のプロジェクト |
test.c
#include <tchar.h>
#define dprintf(fmt, var) _tprintf(_T(#var)_T("=[")fmt##_T("]\n"), var)
void main()
{
int iSampleIsBest = 123;
int* piSampleIsBest;
piSampleIsBest = &iSampleIsBest;
_tprintf(_T("iSampleIsBest=[%d]\n"), iSampleIsBest);
dprintf(_T("%d"), *piSampleIsBest);
}
実行
iSampleIsBest=[123]
*piSampleIsBest=[123]
最終更新:2012年09月01日 16:49