Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

[C++] g++ compiler question

  1. Aug 10, 2012 #1
    So here is the class constructor that is giving me issues:

    Code (Text):
    cPlayer::cPlayer (SDL_Surface *tank, SDL_Surface *bullet, SDL_Surface *screen)
    Several definitions of variables declared in the class header file
    When I compile it, it g++ says "warning: extended initializer lists only available with
    -std=c++0x or -std=gnu++0x [enabled by default]" 4 times.

    I'm curious as to what is causing this warning to appear because I am clueless as to what it means.

    Thanks for reading, and any help is much appreciated.

    -Peter P.

    EDIT: I found the problem. I was defining things a certain way that was causing the warning to pop up.
    Last edited: Aug 10, 2012
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted