回复 16# 的帖子
你的意思是在这里加吗?我加了之后,i 的值还不是10啊
// 变量练习2.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "变量练习2.h"
#include "变量练习2Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMy2App
BEGIN_MESSAGE_MAP(CMy2App, CWinApp)
//{{AFX_MSG_MAP(CMy2App)
// NOTE - the ClassWizard will add and remove mapping macros here.
//
DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMy2App construction
CMy2App::CMy2App()
{
int i=10;// TODO: add construction code here,//(这里是我加的啊,对不对?
)
// Place all significant initialization in InitInstance
}