Tic-Tac-Toe SFML C++ [STATE CREATION] - Splash State/Screen

  • MayaGhoneim
    Likes 0

    Problem Description

    I wrote the whole code on Visual Studio 2017 until the main menu with no errors or mistakes at all but the State Machine keeps giving me these 30 errors no matter what

    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(5): error C2653: 'StateMachine': is not a class or namespace name
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(5): error C2065: 'StateRef': undeclared identifier
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(5): error C2146: syntax error: missing ')' before identifier 'newState'
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(6): error C2143: syntax error: missing ';' before '{'
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(6): error C2447: '{': missing function header (old-style formal list?)
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(12): error C2653: 'StateMachine': is not a class or namespace name
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(14): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(17): error C2653: 'StateMachine': is not a class or namespace name
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(19): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(21): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(22): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(24): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(28): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(30): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(32): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(34): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(36): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(40): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(43): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(43): error C2039: 'move': is not a member of 'std'
    1>c:\users\dell\source\repos\sfml\sfml\predefined c++ types (compiler internal)(256): note: see declaration of 'std'
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(43): error C3861: 'move': identifier not found
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(44): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(45): error C2355: 'this': can only be referenced inside non-static member functions or non-static data member initializers
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(49): error C2143: syntax error: missing ';' before '&'
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(49): error C2653: 'StateMachine': is not a class or namespace name
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(50): error C2059: syntax error: '{'
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(50): error C2143: syntax error: missing ';' before '{'
    1>c:\users\dell\source\repos\sfml\sfml\statemachine.cpp(50): error C2447: '{': missing function header (old-style formal list?)
    1>Generating Code...
    1>Done building project "SFML.vcxproj" -- FAILED.

  • Sonar Systems admin
    Likes 0

    What version?

Login to reply