Click here to Skip to main content
16,011,680 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Font Pin
Johann Gerell12-Oct-03 19:46
Johann Gerell12-Oct-03 19:46 
GeneralRect positioning Pin
act_x12-Oct-03 16:45
act_x12-Oct-03 16:45 
GeneralRe: Rect positioning Pin
YaronNir12-Oct-03 21:52
YaronNir12-Oct-03 21:52 
GeneralRe: UpdateData() and worker thread Pin
valikac12-Oct-03 16:32
valikac12-Oct-03 16:32 
QuestionHas Anyone ever had D3D Running FULLSCREEN in a SDI App?? Pin
Member 50926812-Oct-03 11:27
Member 50926812-Oct-03 11:27 
AnswerRe: Has Anyone ever had D3D Running FULLSCREEN in a SDI App?? Pin
Joey Bloggs12-Oct-03 15:47
Joey Bloggs12-Oct-03 15:47 
GeneralRe: Has Anyone ever had D3D Running FULLSCREEN in a SDI App?? Pin
Member 50926813-Oct-03 6:33
Member 50926813-Oct-03 6:33 
GeneralEnum problem Pin
Ziro_012-Oct-03 5:39
Ziro_012-Oct-03 5:39 
Hello.
I am having trouble using a template function with a return type of an enum as a friend of a non-templayte class. When I use the code sample (below), I get:

"error C2440: 'initializing' : cannot convert from 'void' to 'enum ENS' Expressions of type void cannot be converted to other types"

I am using Microsoft Visual C++ 6.0 Professional Edition. If anyone can shed some light on this, I would really appreciate it. Wink | ;-)

//=============================================
enum ENS {
ENS1,
ENS2,
ENS3
};

class A;

template <class T>
ENS f(T, A *a) {
a->x;
return(ENS1);
}

class A {
private:
int x;

template <class T>
friend ENS f(T, A *a);
};

//=============================================
int main(int argc, char* argv[]) {
A a;
int i = 4;
ENS e = f<int>(i, &a); //this line generates
// the c2440 error
return(0);
}
GeneralRe: Enum problem Pin
Michael Dunn12-Oct-03 7:52
sitebuilderMichael Dunn12-Oct-03 7:52 
GeneralRe: Enum problem Pin
Ziro_012-Oct-03 15:46
Ziro_012-Oct-03 15:46 
GeneralUpdateData() and worker thread Pin
AJ12312-Oct-03 5:24
AJ12312-Oct-03 5:24 
GeneralHarddisk partitions Pin
m.badran12-Oct-03 4:56
m.badran12-Oct-03 4:56 
GeneralRe: Harddisk partitions Pin
Michael Dunn12-Oct-03 7:54
sitebuilderMichael Dunn12-Oct-03 7:54 
GeneralRe: Harddisk partitions Pin
Chernobog112-Oct-03 21:37
Chernobog112-Oct-03 21:37 
GeneralRe: Harddisk partitions Pin
Michael Dunn13-Oct-03 4:43
sitebuilderMichael Dunn13-Oct-03 4:43 
GeneralCOleDropTarget::OnDragOver(), windows ignores my DROPEFFECT_NONE Pin
ohadp12-Oct-03 1:55
ohadp12-Oct-03 1:55 
GeneralNetwork Spy Pin
Stan the man12-Oct-03 1:49
Stan the man12-Oct-03 1:49 
GeneralNetwork Spy Pin
Stan the man12-Oct-03 1:48
Stan the man12-Oct-03 1:48 
GeneralRe: Network Spy Pin
Terry O'Nolley12-Oct-03 13:57
Terry O'Nolley12-Oct-03 13:57 
QuestionPossible to build static Libs with Ressources? Pin
conman11012-Oct-03 0:27
conman11012-Oct-03 0:27 
AnswerRe: Possible to build static Libs with Ressources? Pin
Mike Dimmick12-Oct-03 2:42
Mike Dimmick12-Oct-03 2:42 
GeneralRe: Possible to build static Libs with Ressources? Pin
conman11012-Oct-03 4:52
conman11012-Oct-03 4:52 
Generalsorry for the newbie questions hehe Pin
N.Byarley11-Oct-03 16:48
N.Byarley11-Oct-03 16:48 
QuestionHow to read a file line-by-line? Pin
IGx8911-Oct-03 14:33
IGx8911-Oct-03 14:33 
AnswerRe: How to read a file line-by-line? Pin
ZoogieZork11-Oct-03 16:23
ZoogieZork11-Oct-03 16:23 

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.