Click here to Skip to main content
15,790,267 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 8:21
mveRichard MacCutchan4-Jul-14 8:21 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 9:20
bkelly134-Jul-14 9:20 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 21:10
mveRichard MacCutchan4-Jul-14 21:10 
Generalreasons Pin
bkelly135-Jul-14 8:22
bkelly135-Jul-14 8:22 
GeneralRe: reasons Pin
Richard MacCutchan6-Jul-14 5:44
mveRichard MacCutchan6-Jul-14 5:44 
GeneralRe: reasons Pin
bkelly137-Jul-14 15:03
bkelly137-Jul-14 15:03 
GeneralRe: reasons Pin
Richard MacCutchan7-Jul-14 23:04
mveRichard MacCutchan7-Jul-14 23:04 
Questionfriend declaration causes undeclared identifier Pin
bkelly1330-Jun-14 6:55
bkelly1330-Jun-14 6:55 
Windows 7, Visual Studio 2008, C++, MFC
I cannot cut and paste to this forum so please exclude minor typos.
Here is the first class declaration:
VB
Class C_AR2_Messages
Public:
   Class C_AR2_Messages();
  ~ Class C_AR2_Messages();
Private:
…
// friend void_C_Configuration_Manager( const C_AR2_Messages & );
// I found the template for this somewhere and presume that C_Configuration_Manager needs to be given the address of AR2_Messages so it can find variables declared private.
};

A fragment from the definition of C_AR2_Messages:
bool C_AR2_Messages::Configure_The_Application() 
{   
   C_Configuration_Manager *Message_Configurator;  // << first error will be this line
Message_Configurator = new   C_Configuration_Manager;  
… }

This all compiles as shown with no errors.
HOWEVER: when the friend line is uncommented out the compiler complains with the error:

Quote:
C2061: ‘Message_Configurator’ : undeclared identifier.


It references that line so marked above. (Not the "friend" line in the declaration.) Since that is a pointer declaration I do not understand how the addition of the friend line causes it to become undeclared.
A google search returned what seems to be a good match for this problem, but I am on a military base and the firewall says that site is prohibited.
Will someone please enlighten me?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com



modified 30-Jun-14 12:24pm.

AnswerRe: friend declaration causes undeclared identifier Pin
Subrat 470826612-Sep-14 16:20
Subrat 470826612-Sep-14 16:20 
Questiondestructor not being called (Resolved) Pin
bkelly1326-Jun-14 17:17
bkelly1326-Jun-14 17:17 
AnswerRe: destructor not being called Pin
Orjan Westin26-Jun-14 23:26
professionalOrjan Westin26-Jun-14 23:26 
GeneralRe: destructor not being called Pin
bkelly1327-Jun-14 14:06
bkelly1327-Jun-14 14:06 
Questionarray of static text controls Pin
bkelly1322-Jun-14 10:35
bkelly1322-Jun-14 10:35 
AnswerRe: array of static text controls Pin
Albert Holguin26-Jun-14 11:48
professionalAlbert Holguin26-Jun-14 11:48 
Questionneed help selecting a string type Pin
bkelly1313-Jun-14 5:27
bkelly1313-Jun-14 5:27 
AnswerRe: need help selecting a string type Pin
Richard MacCutchan13-Jun-14 8:13
mveRichard MacCutchan13-Jun-14 8:13 
GeneralRe: need help selecting a string type Pin
bkelly1313-Jun-14 8:39
bkelly1313-Jun-14 8:39 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan13-Jun-14 22:31
mveRichard MacCutchan13-Jun-14 22:31 
GeneralRe: need help selecting a string type Pin
bkelly1314-Jun-14 10:47
bkelly1314-Jun-14 10:47 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan14-Jun-14 11:05
mveRichard MacCutchan14-Jun-14 11:05 
GeneralRe: need help selecting a string type Pin
bkelly1314-Jun-14 16:53
bkelly1314-Jun-14 16:53 
GeneralRe: need help selecting a string type Pin
Richard MacCutchan14-Jun-14 22:08
mveRichard MacCutchan14-Jun-14 22:08 
Generalgoing heavy Pin
bkelly1316-Jun-14 14:49
bkelly1316-Jun-14 14:49 
GeneralRe: going heavy Pin
Richard MacCutchan16-Jun-14 22:24
mveRichard MacCutchan16-Jun-14 22:24 
GeneralRe: need help selecting a string type Pin
Theo Buys6-Aug-15 6:31
Theo Buys6-Aug-15 6:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.