Code:
#include <iostream>
#include <string>
using namespace std;
class Races
{
public:
int raceID;
string raceName;
string raceEner;
string raceEP;
string raceDesc;
float raceAttG[4];
float raceResE[3];
float raceResP[3];
float raceResM[3];
Races ();
Races (int a, string b, string c, string d, string e, float f, float g, float aa, float ab, float ac, float ad,
float ae, float af, float ag, float ba, float bb, float bc, float bd)
{
raceID = a;
raceName = b;
raceEner = c;
raceEP = d;
raceDesc = e;
raceAttG[0] = f;
raceAttG[1] = g;
raceAttG[2] = aa;
raceAttG[3] = ab;
raceResE[0] = ac;
raceResE[1] = ad;
raceResE[2] = ae;
raceResP[0] = af;
raceResP[1] = ag;
raceResP[2] = ba;
raceResM[0] = bb;
raceResM[1] = bc;
raceResM[2] = bd;
}
}DBraces[20], charRace;
int main()
{
DBraces[1].Races(1, "a", "a", "a", "a", 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5);
return 0;
}
THE ERROR
------ Build started: Project: Helios RPG - Beta, Configuration: Release Win32 ------
Compiling...
Main.cpp
.\Main.cpp(45) : error C2274: 'function-style cast' : illegal as right side of '.' operator
Build log was saved at "file://c:\Documents and Settings\eng\My Documents\Visual Studio 2008\Projects\Project1\Helios RPG - Beta\Helios RPG - Beta\Release\BuildLog.htm"
Helios RPG - Beta - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
whats wrong with it?