#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <cmath>
#include <cstdlib>
#include <iomanip>
using namespace std;
#define ARRAYSIZE 15;
int main(void)
{
//things needed
ifstream infile;
ofstream outfile;
double xArray[ARRAYSIZE];
}
As you can see, my code should be in order but my program keeps telling me it expects a '[' where the xArray[ARRAYSIZE] is. By the way I'm using microsoft visual studio 2013.
Take the
;
out of the#define
.With your
#define
written as is,translates to
The compiler expects a
]
before the first;
.Doing this:
might be better...