Click here to Skip to main content
15,908,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Nothing else should happen while a while loop is going.. right? Pin
lafleon9-Feb-07 10:30
lafleon9-Feb-07 10:30 
GeneralRe: Nothing else should happen while a while loop is going.. right? Pin
Anthony Mushrow9-Feb-07 10:43
professionalAnthony Mushrow9-Feb-07 10:43 
GeneralRe: Nothing else should happen while a while loop is going.. right? Pin
#realJSOP9-Feb-07 10:55
professional#realJSOP9-Feb-07 10:55 
GeneralRe: Nothing else should happen while a while loop is going.. right? Pin
Anthony Mushrow9-Feb-07 11:01
professionalAnthony Mushrow9-Feb-07 11:01 
GeneralRe: Nothing else should happen while a while loop is going.. right? Pin
led mike9-Feb-07 11:08
led mike9-Feb-07 11:08 
AnswerRe: Nothing else should happen while a while loop is going.. right? [modified] Pin
Waldermort9-Feb-07 11:41
Waldermort9-Feb-07 11:41 
GeneralRe: Nothing else should happen while a while loop is going.. right? [modified] Pin
Anthony Mushrow9-Feb-07 12:09
professionalAnthony Mushrow9-Feb-07 12:09 
Questionillegal use of this type as an expression Pin
hsuch9-Feb-07 8:11
hsuch9-Feb-07 8:11 
Hi all,

I'm new to C++. I've a stupid problem. This is the code I used:
<br />
class A<br />
{<br />
	int x;<br />
};<br />
<br />
class B<br />
{<br />
        template<class T> void temp(void){ };<br />
	void test(void);<br />
};<br />
<br />
void B::test(void)<br />
{ <br />
	temp<A>(); <br />
};<br />

Why can't I compile this code? The error message is:
test.cpp(23) :error C2275: 'A' : illegal use of this type as an expression
test.cpp(23) : error C2059: syntax error : ')'

If I move the template function temp() out from class B, then it is ok. Could someone help me? Thanks a lot.
AnswerRe: illegal use of this type as an expression Pin
Sceptic Mole9-Feb-07 8:22
Sceptic Mole9-Feb-07 8:22 
GeneralRe: illegal use of this type as an expression Pin
hsuch9-Feb-07 13:43
hsuch9-Feb-07 13:43 
AnswerRe: illegal use of this type as an expression Pin
Chris Losinger9-Feb-07 9:39
professionalChris Losinger9-Feb-07 9:39 
GeneralRe: illegal use of this type as an expression Pin
Michael Dunn9-Feb-07 10:57
sitebuilderMichael Dunn9-Feb-07 10:57 
GeneralRe: illegal use of this type as an expression Pin
Chris Losinger9-Feb-07 11:15
professionalChris Losinger9-Feb-07 11:15 
GeneralRe: illegal use of this type as an expression Pin
Michael Dunn9-Feb-07 11:19
sitebuilderMichael Dunn9-Feb-07 11:19 
QuestionRe: illegal use of this type as an expression Pin
David Crow9-Feb-07 9:42
David Crow9-Feb-07 9:42 
AnswerRe: illegal use of this type as an expression Pin
Michael Dunn9-Feb-07 10:58
sitebuilderMichael Dunn9-Feb-07 10:58 
GeneralRe: illegal use of this type as an expression Pin
hsuch9-Feb-07 16:24
hsuch9-Feb-07 16:24 
QuestionLearning MFC Pin
Alessandra779-Feb-07 7:44
Alessandra779-Feb-07 7:44 
AnswerRe: Learning MFC Pin
Hamid_RT9-Feb-07 7:58
Hamid_RT9-Feb-07 7:58 
GeneralRe: Learning MFC Pin
Alessandra779-Feb-07 8:03
Alessandra779-Feb-07 8:03 
GeneralRe: Learning MFC Pin
Hamid_RT9-Feb-07 8:15
Hamid_RT9-Feb-07 8:15 
AnswerRe: Learning MFC Pin
Mark Salsbery9-Feb-07 8:20
Mark Salsbery9-Feb-07 8:20 
GeneralRe: Learning MFC Pin
Ravi Bhavnani9-Feb-07 8:48
professionalRavi Bhavnani9-Feb-07 8:48 
GeneralRe: Learning MFC Pin
led mike9-Feb-07 9:09
led mike9-Feb-07 9:09 
AnswerRe: Learning MFC Pin
Ravi Bhavnani9-Feb-07 8:53
professionalRavi Bhavnani9-Feb-07 8:53 

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.