掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
変数宣言の仕方 クラス内.cppか Headerか (ID:73004)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
そうですね。 基本のことをおしえてください。 ChildView.h は // ChildView.h : interface of the CChildView class // /////////////////////////////////////////////////////////////// #if !defined(AFX_CHILDVIEW_H__00AB081C_A381_41AA_B5D2_605519F5E69E__INCLUDED_) #define AFX_CHILDVIEW_H__00AB081C_A381_41AA_B5D2_605519F5E69E__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "MemDC.h" #include "ParameterDlg.h" // 20021017 for ParameterDilog #include "KolamDesigner.h" // nagata for KolamDesignerApp ///////////////////////////////////////////////////// // CChildView window #define TIMER_INTERVAL 0 class CChildView : public CWnd { // Construction public: CChildView(); // Attributes public: CParameterDlg m_wndParam;// パラメータダイアログ CString m_imageD_F_Name; // a temporary filename 以下多くの(一般)変数宣言 // Generated message map functions protected: //{{AFX_MSG(CChildView) afx_msg void OnPaint( ); afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnOpenKomaFile(); //for file-menu nagata afx_msg void OnSaveKomaFile(); //for file-menu nagata 以下略 //}}AFX_MSG DECLARE_MESSAGE_MAP() }; で、この後に static int knap; //present Koma number with Keyin のように多くのstatic変数を宣言しています。 このようなStatic変数の書く位置は適切でしょうか? 上述の(一般)変数宣言の後、即ち // Generated message map functionsの前に書くべきでしょうか?
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.