dimanche 1 novembre 2015

expected { before destructor

I've got a problem with my newly class called Fountainofyouth. After trying to build whole project debugger shows warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default] and error: expected '{' before 'Fountainofyouth' Can anybody tell me whats going on? content of Fountainofyouth.cpp:

`

#include "Fountainofyouth.h"

//warning
Fountainofyouth::Fountainofyouth(int startDrinks) : Field
{
    //ctor
}

//error
Fountainofyouth::~Fountainofyouth()
{
    //dtor
}

string Fountainofyouth::fieldType()
{
    return 0;
}

bool Fountainofyouth::canEnter(Unit* unit)
{
    return 0;
}

void Fountainofyouth::affect(Unit* unit)
{

}

`

Aucun commentaire:

Enregistrer un commentaire