Code:

#include <iostream>
#include <vector>
using namespace std;
void MagicSquare ( double matrix, int n );
void DisplaySquare ( int matrix, int n );
int main(void)
{
int order;
double TwoDimArray[order][order];
cout <<"This program will create a magic square of an odd order\n";
cout <<"Please enter the order number you would like:\n";
cin >> order;
std::vector<std::vector<double> > TwoDimArray(order, std::vector<double>(order));
if (order%2==1)
MagicSquare( TwoDimArray, order );
else{
while (order%2==0){
cout <<"Please enter an odd number:\n";
cin >> order;
}
MagicSquare( TwoDimArray, order );
}
}
void MagicSquare ( double matrix, int n )
{
int max = n * n;
int i=0;
int j=n/2; // start position
for (int k=1; k<=max; ++k)
{
matrix[i][j] = k;
i--;
j++;
if (k%n == 0)
{
i += 2;
--j;
}
else
{
if (j==n)
j -= n;
else if (i<0)
i += n;
}
}
}
void DisplaySquare( &matrix, int n)
{
int i;
int j;
for (int i=0; i<n; i++)
{
for (int j=0; j<n; j++)
printf(" %3d", matrix[i][j]);
printf("\n");
}
printf("\n\n");
}

do i need to change the type of 'order'?