extern variable
-
MFC, STUDIO 2008, MDI There are into project some global variable created same method Last ‘m_gsADDRESSHOM’ can’t to create. extern CString m_gsADDRESSHOM; // set into file stdafx.h // modeldlg2.cpp : implementation file #include "stdafx.h" #include "modeldlg2.h" CString m_gsADDRESSHOM; // CMainDlg2 dialog Using global variable pEdit_ADDRESS->SetWindowTextW(dlg7.m_gsADDRESSHOM); // error C2039: 'm_gsADDRESSHOM' : is not a member of 'CMainDlg2'
-
MFC, STUDIO 2008, MDI There are into project some global variable created same method Last ‘m_gsADDRESSHOM’ can’t to create. extern CString m_gsADDRESSHOM; // set into file stdafx.h // modeldlg2.cpp : implementation file #include "stdafx.h" #include "modeldlg2.h" CString m_gsADDRESSHOM; // CMainDlg2 dialog Using global variable pEdit_ADDRESS->SetWindowTextW(dlg7.m_gsADDRESSHOM); // error C2039: 'm_gsADDRESSHOM' : is not a member of 'CMainDlg2'
durban2 wrote:
Using global variable
durban2 wrote:
dlg7.m_gsADDRESSHOM
It's a global variable - that means it's not a member of dlg7, so don't treat it as if it were. Do you think you maybe need to read an introductory C++ text[^], to learn these basics?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
MFC, STUDIO 2008, MDI There are into project some global variable created same method Last ‘m_gsADDRESSHOM’ can’t to create. extern CString m_gsADDRESSHOM; // set into file stdafx.h // modeldlg2.cpp : implementation file #include "stdafx.h" #include "modeldlg2.h" CString m_gsADDRESSHOM; // CMainDlg2 dialog Using global variable pEdit_ADDRESS->SetWindowTextW(dlg7.m_gsADDRESSHOM); // error C2039: 'm_gsADDRESSHOM' : is not a member of 'CMainDlg2'
durban2 wrote:
pEdit_ADDRESS->SetWindowTextW(dlg7.m_gsADDRESSHOM);
try using like this :- pEdit_ADDRESS->SetWindowTextW(m_gsADDRESSHOM);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You