Click here to Skip to main content
15,892,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Exe file compatibility Pin
David Crow17-Apr-15 10:20
David Crow17-Apr-15 10:20 
AnswerRe: Exe file compatibility Pin
Frankie-C17-Apr-15 10:58
Frankie-C17-Apr-15 10:58 
AnswerRe: Exe file compatibility Pin
Albert Holguin1-May-15 4:56
professionalAlbert Holguin1-May-15 4:56 
QuestionUnable to invoke VIsual Studio debugger in Child process VS2012 pro Pin
ForNow17-Apr-15 3:01
ForNow17-Apr-15 3:01 
AnswerRe: Unable to debug Child process VS2012 pro follow up Pin
ForNow17-Apr-15 11:34
ForNow17-Apr-15 11:34 
GeneralI think I found a solution Pin
ForNow20-Apr-15 14:26
ForNow20-Apr-15 14:26 
QuestionRe: Unable to invoke VIsual Studio debugger in Child process VS2012 pro Pin
Richard MacCutchan17-Apr-15 21:17
mveRichard MacCutchan17-Apr-15 21:17 
AnswerRe: Unable to invoke VIsual Studio debugger in Child process VS2012 pro Pin
ForNow18-Apr-15 14:57
ForNow18-Apr-15 14:57 
Answervsjitdebugger Just in time Debugger not set on my laptop windows 8.1 VS 2012 pro Pin
ForNow19-Apr-15 3:16
ForNow19-Apr-15 3:16 
QuestionMFC: CMFCShellTreeCtrl Pin
limseungkyun15-Apr-15 21:03
limseungkyun15-Apr-15 21:03 
AnswerRe: MFC: CMFCShellTreeCtrl Pin
David Crow16-Apr-15 9:17
David Crow16-Apr-15 9:17 
Questioncross platform tcp c program Pin
praveenvelu15-Apr-15 18:05
praveenvelu15-Apr-15 18:05 
AnswerRe: cross platform tcp c program Pin
Richard MacCutchan15-Apr-15 21:40
mveRichard MacCutchan15-Apr-15 21:40 
AnswerRe: cross platform tcp c program Pin
Albert Holguin16-Apr-15 8:25
professionalAlbert Holguin16-Apr-15 8:25 
QuestionCAsyncSockets Blocking/Non blockung Pin
ForNow15-Apr-15 15:41
ForNow15-Apr-15 15:41 
AnswerRe: CAsyncSockets Blocking/Non blockung Pin
Richard MacCutchan15-Apr-15 21:39
mveRichard MacCutchan15-Apr-15 21:39 
GeneralRe: CAsyncSockets Blocking/Non blockung Pin
ForNow16-Apr-15 10:38
ForNow16-Apr-15 10:38 
QuestionInitialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen15-Apr-15 14:59
Bram van Kampen15-Apr-15 14:59 
AnswerRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Richard MacCutchan15-Apr-15 21:37
mveRichard MacCutchan15-Apr-15 21:37 
GeneralRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen26-Apr-15 14:39
Bram van Kampen26-Apr-15 14:39 
AnswerRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
bling17-Apr-15 9:49
bling17-Apr-15 9:49 
GeneralRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen26-Apr-15 14:31
Bram van Kampen26-Apr-15 14:31 
QuestionBuild errors ! Pin
Member 935023715-Apr-15 3:01
Member 935023715-Apr-15 3:01 
Hi Guys!,

I have been working on Finite state machine based on a well documented tutorial in code project

Generic Finite State Machine (FSM)[^]

I tried compiling the sample project available with this but can't proceed because of few errors. The project is develped with VS 2010 but I'm using 2012.

I'll give the code excerpt where the error points..
C++
struct StateHandlerBase
    {
        SharedData data;
        States state;
        Transitions *m_interfaces[static_cast<size_t>(Size)];
        StateHandlerBase()
            : data(SharedData()),
            state(static_cast<States>(InitState))/*, m_interfaces({0})*/
        {
        }

    };

    typedef int DummyExplicitSpecialization;
    template <States stateParam, class Dummy=DummyExplicitSpecialization>
    struct StateHandler
        : StateHandler<static_cast<States>(static_cast<size_t>(stateParam)-1)>
    {
        TransitionImplement<StateMachineComponents, static_cast<States>(stateParam)> m_interface;
        StateHandler() : m_interface(StateHandlerBase::state, StateHandlerBase::data)
        {
            StateHandlerBase::m_interfaces[static_cast<size_t>(stateParam)] = &m_interface;
        }
    };

    template <class DummyExplicitSpecialization>
    struct StateHandler<static_cast<States>(0), DummyExplicitSpecialization>
        : StateHandlerBase
    {
        TransitionImplement<StateMachineComponents, static_cast<States>(0)> m_interface;
        StateHandler() : m_interface(StateHandlerBase::state, StateHandlerBase::data)
        {
            StateHandlerBase::m_interfaces[0] = &m_interface;
        }
    };

    typedef StateHandler<static_cast<States>(TerminateState), DummyExplicitSpecialization> StateHanlderType;

 StateHanlderType StateHanlderInstance;

These are the errors:

error C2976: 'Fsm<statemachinecomponents>::StateHandler' : too few template arguments

error C3855: 'Fsm<statemachinecomponents>::StateHandler': template parameter 'stateParam' is incompatible with the declaration


I'm totally stuck!!. I have no idea what is happening
Greatly appreciate possible suggestions to get out of this
SuggestionRe: Build errors ! Pin
David Crow15-Apr-15 3:06
David Crow15-Apr-15 3:06 
GeneralRe: Build errors ! Pin
Member 935023715-Apr-15 3:16
Member 935023715-Apr-15 3:16 

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.