S
Sonoman
Hi all:
I am getting a "missing storage class or idetifier" error and I do not
understand what it means, therefore and I cannot figure it out. I am just
starting a new project and I cannot get past this (may be very simple)
error. My code is as follows:
/////////////////////////array.h
#ifndef array_h
#define array_h
const int MAX = 10;
class array
{
public:
array();
~array();
run();
private:
string playerNames[MAX];
int curTurn;
int numPlayers;
int i;
};
#endif
/////////////////////////array.cpp
#include "array.h"
#include <iostream>
#include <string>
using namespace std;
array::array()
{
for (i = 0; i < MAX; i++)
{
playerNames = " ";
}
curTurn = 0;
numPlayers = 0;
}
array::run()
{
for (i = 0; i < MAX; i++)
{
playerNames = " ";
}
curTurn = 0;
numPlayers = 0;
}
/////////////////////////main.cpp
#include "array.h"
//#include <string>
int main()
{
array a;
a.run();
return 0;
}
/////////////////////////end of code
Thanks in advance.
I am getting a "missing storage class or idetifier" error and I do not
understand what it means, therefore and I cannot figure it out. I am just
starting a new project and I cannot get past this (may be very simple)
error. My code is as follows:
/////////////////////////array.h
#ifndef array_h
#define array_h
const int MAX = 10;
class array
{
public:
array();
~array();
run();
private:
string playerNames[MAX];
int curTurn;
int numPlayers;
int i;
};
#endif
/////////////////////////array.cpp
#include "array.h"
#include <iostream>
#include <string>
using namespace std;
array::array()
{
for (i = 0; i < MAX; i++)
{
playerNames = " ";
}
curTurn = 0;
numPlayers = 0;
}
array::run()
{
for (i = 0; i < MAX; i++)
{
playerNames = " ";
}
curTurn = 0;
numPlayers = 0;
}
/////////////////////////main.cpp
#include "array.h"
//#include <string>
int main()
{
array a;
a.run();
return 0;
}
/////////////////////////end of code
Thanks in advance.