Search code examples
c++visual-c++sdl

Why am I getting a 'no matching token error' in c++ with SDL2?


I am using visual studio with the visual c++ compiler. I am getting an error about 'no matching token found'. I searched on the internet and found out that there is sometimes a missing bracket in this situation. However, I looked through my code and did not find any missing brackets.

This is my project: https://github.com/Ripple-Studios/SDL-Game-For-Brackeys-Jam The error is in 'ECS.h' on line 77.


Solution

  • You are missing a parentheses:

    T* c(new T(std::forward < Targs>(margs)...);
    
    //should be
    T* c(new T(std::forward < Targs>(margs)...));
    

    This error always points to the line where a closing bracket should be, but isn't.