Click here to Skip to main content
15,918,050 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: window media player Pin
Jose Lamas Rios6-Jul-05 3:39
Jose Lamas Rios6-Jul-05 3:39 
Generalip adress Pin
_tasleem5-Jul-05 20:57
_tasleem5-Jul-05 20:57 
GeneralRe: ip adress Pin
ThatsAlok5-Jul-05 21:35
ThatsAlok5-Jul-05 21:35 
GeneralFont Problem Pin
Pazzuzu5-Jul-05 20:46
Pazzuzu5-Jul-05 20:46 
QuestionTo delete functions via IDE of VC++ 2003 ? Pin
Maxwell Chen5-Jul-05 20:45
Maxwell Chen5-Jul-05 20:45 
Generalopening MDI in maximized form at startup Pin
sayup5-Jul-05 20:15
sayup5-Jul-05 20:15 
GeneralRe: opening MDI in maximized form at startup Pin
Antony T5-Jul-05 22:48
sussAntony T5-Jul-05 22:48 
Generalenum in a switch statement Pin
Ista5-Jul-05 20:13
Ista5-Jul-05 20:13 
I have the following .h file to hold all my enums


#pragma once

enum WordDirection
{
Right = 0,
Down,
Diag_Down,
Diag_Up
};


my code in the class is

...
WordDirection wDir = (WordDirection)(int)(rand()%4);

...

switch( wDir )
{
case (int)WordDirection.RIGHT:
x_add = 1;
y_add = 0;
if( x <= this->Width() - length )
isPlaced = true;
break;
}


...

any ideas whits not recognized in a switch? I get a c226 error. "unexpected type"

please help me.

This is VC 2003


Thanks,
Nick

I'm not an expert yet, but I play one at work. Yeah and here too.
GeneralRe: enum in a switch statement Pin
ThatsAlok5-Jul-05 20:26
ThatsAlok5-Jul-05 20:26 
GeneralRe: enum in a switch statement Pin
Bob Stanneveld5-Jul-05 22:18
Bob Stanneveld5-Jul-05 22:18 
GeneralRe: enum in a switch statement Pin
ThatsAlok6-Jul-05 1:44
ThatsAlok6-Jul-05 1:44 
GeneralRe: enum in a switch statement Pin
Bob Stanneveld6-Jul-05 1:47
Bob Stanneveld6-Jul-05 1:47 
GeneralRe: enum in a switch statement Pin
Ista6-Jul-05 8:56
Ista6-Jul-05 8:56 
GeneralRe: enum in a switch statement Pin
Rick York6-Jul-05 11:46
mveRick York6-Jul-05 11:46 
GeneralRe: enum in a switch statement Pin
Ista6-Jul-05 11:51
Ista6-Jul-05 11:51 
GeneralRe: enum in a switch statement Pin
Bob Stanneveld6-Jul-05 20:40
Bob Stanneveld6-Jul-05 20:40 
GeneralUsername n Password Pin
kireken5-Jul-05 19:10
kireken5-Jul-05 19:10 
GeneralRe: Username n Password Pin
Christian Graus5-Jul-05 19:33
protectorChristian Graus5-Jul-05 19:33 
GeneralRe: Username n Password Pin
kireken5-Jul-05 19:48
kireken5-Jul-05 19:48 
GeneralRe: Username n Password Pin
Christian Graus6-Jul-05 11:12
protectorChristian Graus6-Jul-05 11:12 
GeneralRe: Username n Password Pin
Anonymous6-Jul-05 19:46
Anonymous6-Jul-05 19:46 
GeneralRe: Username n Password Pin
Christian Graus6-Jul-05 23:06
protectorChristian Graus6-Jul-05 23:06 
Generalwrite text for read only Pin
Member 20973435-Jul-05 19:08
Member 20973435-Jul-05 19:08 
GeneralRe: write text for read only Pin
Christian Graus5-Jul-05 19:35
protectorChristian Graus5-Jul-05 19:35 
GeneralRe: write text for read only Pin
David Crow6-Jul-05 2:47
David Crow6-Jul-05 2:47 

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.