Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMathew Bergen

Posted 29 November 2012 - 12:05 AM

Hello, i am trying to setup a class for handling everything in my program so that the my main.cpp isn't cluttered. However i have some SDL_Surfaces that i need to use in different member functions of the class, but the program crashed when i defined them in the class and then initialize them in the constructor. So i initialize them in the class as const static SDL_Surfaces; I still got an error saying i need to have a const member to initialize them in the class. Could someone please show me a different method, or fix my method. Thanks

#1Mathew Bergen

Posted 29 November 2012 - 12:03 AM

Hello, i am trying to setup a class for handling everything in my program so that the my main.cpp isn't cluttered. However i have some SDL_Surfaces that i need to use in different member functions of the class and the program crashed when i defined them in the class and then initialize them in the constructor. So i initialize them int the class as const static SDL_Surfaces. and i still got an error saying i need to have a const member to initialize them in the class. Could someone please show me a different method or fix my method. Thanks

PARTNERS