Click here to Skip to main content
15,895,973 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can any 1 help me Pin
PJ Arends3-Jul-05 7:34
professionalPJ Arends3-Jul-05 7:34 
AnswerRe: Can any 1 help me Pin
Bob Stanneveld3-Jul-05 20:51
Bob Stanneveld3-Jul-05 20:51 
Generalre: TSP using GA Pin
mark77203-Jul-05 3:35
mark77203-Jul-05 3:35 
GeneralAdding pages to the Power Manager (IShellPropSheetExt) Pin
Mochiler2-Jul-05 22:28
Mochiler2-Jul-05 22:28 
Generaladd value cross class: help me Pin
2-Jul-05 20:50
suss2-Jul-05 20:50 
GeneralRe: add value cross class: help me Pin
Cedric Moonen3-Jul-05 0:56
Cedric Moonen3-Jul-05 0:56 
Generalerror C2039 Pin
John R. Shaw2-Jul-05 16:34
John R. Shaw2-Jul-05 16:34 
GeneralRe: error C2039 Pin
Jose Lamas Rios2-Jul-05 18:33
Jose Lamas Rios2-Jul-05 18:33 
John R. Shaw wrote:
Q2: What was the error message, in VC7, that followed this one.

Q3: What did you mean in Q2? Smile | :)

Just to make this post somewhat useful, the global typedefs before the main function should be read as follows:
// global typedefs
typedef classA<char> classA_type;
typedef classB<classA_type> classB_type;

I kept wondering what purpose served those typedefs until I looked at the HTML source Smile | :) You may want to edit the original post.

As to why that would generate a C2039, I'm so in the dark I don't even dare to try a stab. Sorry Smile | :)

Hmm... actually, I'll try one. While coding with templates, I sometimes get to see puzzling compiler errors in situations like this:

// Instead of using two separate typedefs
// I'll try this
typedef classB<classA<char>> classB_type;
// This generates extrange compiler errors

The problem with the above code, which is isn't evident at all from the error messages it generates, is that the compiler gets confused by the two consecutive closing angle brackets and takes them for the >> operator. If you insert at least one space between them, the errors do go away:
// Instead of using two separate typedefs
// I'll try this
typedef classB<classA<char> > classB_type;
// This compiles with no errors

Any chance your original code suffered of this problem?


--
jlr
http://jlamas.blogspot.com/[^]
GeneralRe: error C2039 Pin
John R. Shaw2-Jul-05 20:37
John R. Shaw2-Jul-05 20:37 
GeneralRe: error C2039 Pin
S. Senthil Kumar3-Jul-05 3:53
S. Senthil Kumar3-Jul-05 3:53 
GeneralRe: error C2039 Pin
John R. Shaw3-Jul-05 7:19
John R. Shaw3-Jul-05 7:19 
GeneralClassWizard Problem : Help Me Pin
prateekduble2-Jul-05 12:25
prateekduble2-Jul-05 12:25 
GeneralRe: ClassWizard Problem : Help Me Pin
John R. Shaw2-Jul-05 16:51
John R. Shaw2-Jul-05 16:51 
GeneralRe: ClassWizard Problem : Help Me Pin
prateekduble2-Jul-05 19:13
prateekduble2-Jul-05 19:13 
GeneralRe: ClassWizard Problem : Help Me Pin
John R. Shaw2-Jul-05 20:46
John R. Shaw2-Jul-05 20:46 
QuestionAnyone with Boost::Graph experience? Pin
Nathan Addy2-Jul-05 9:35
Nathan Addy2-Jul-05 9:35 
AnswerRe: Anyone with Boost::Graph experience? Pin
John R. Shaw2-Jul-05 18:03
John R. Shaw2-Jul-05 18:03 
GeneralDynamic Buttons Pin
Ger Hayden2-Jul-05 8:53
Ger Hayden2-Jul-05 8:53 
GeneralRe: Dynamic Buttons Pin
PJ Arends2-Jul-05 9:30
professionalPJ Arends2-Jul-05 9:30 
QuestionBlinking Button? Pin
DanYELL2-Jul-05 6:30
DanYELL2-Jul-05 6:30 
AnswerRe: Blinking Button? Pin
Trollslayer2-Jul-05 6:49
mentorTrollslayer2-Jul-05 6:49 
AnswerRe: Blinking Button? Pin
toxcct2-Jul-05 7:20
toxcct2-Jul-05 7:20 
AnswerRe: Blinking Button? Pin
Michael Dunn3-Jul-05 10:26
sitebuilderMichael Dunn3-Jul-05 10:26 
QuestionTCHAR error? Pin
Larsson2-Jul-05 6:09
Larsson2-Jul-05 6:09 
AnswerRe: TCHAR error? Pin
PJ Arends2-Jul-05 9:38
professionalPJ Arends2-Jul-05 9:38 

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.