#include "stdafx.h"
#include "iostream"
#include "string"
using namespace System;
using namespace std;
class gate
{
public:
enum mod {single=12,local,global} type;
}gatearry[9];
By repeating the assignment enum values
gatearry[1].type=gate::global;
gatearry[2].type=gate::single;
Instead of above code.
Allocation problem enum values to object class entry.
The difficulty is in using cin
in the following loop written in main
.
for(i=0;i<9;i++)
{
cin>>gatearry[i].type;
}