So heres my code:
#include <iostream>
#include <string>
using namespace std;
class Planet_Database{
public:
string PlanetNames[10] = { "Earth", "Mars", "Saturn", "Jupiter", "Pluto", "Venus", "Uranus", "Mercury", "Neptune", "Sun" };
private:
};
using namespace std;
int main()
{
Planet_Database PDB;
cout << PDB.PlanetNames[3] << endl;
system("pause");
}
It should display Jupiter, but yea.. i just get this error:
Error 1 error C2536: 'Planet_Database::Planet_Database::PlanetNames' : cannot specify explicit initializer for arrays c:\users\bobby\desktop\game c++\web\web\source.cpp 10 1 Web
Oh ya, code tags, ok, sorry and thanks