Randon Access Array Processing

Program functionality:
1.) Design a rudimentary spread sheet.
2.) Provide provision for the entry of a formula, i.e. cell#?? = value, cell#?? = operation, cell#?? = value, and cell#?? = answer.
3.) Basic arithmetic operations (+,-,*,/)

I have the grid display completed. How do I go about coding for the selection of a cell and then display the value within that cell.

Here is my code for the design of the grid.

void _tmain(int argc, _TCHAR* argv[])
{
char RowList,ColList;
int g,h,i,j,k;
float operand1;
float CellGrid[ROW][COL];

cout << fixed;
cout << setprecision(3);

for(g=0;g<ROW;g++)
{
for(h=0;h<COL;h++)
{
CellGrid[g][h] = (0)*(0);
}
}

for(i=0,RowList='A';i<ROW;i++,RowList++)
{
cout << " " << RowList << " ";
}
cout << endl;
cout << setfill('_') << setw(77) << '_';
cout << endl;
for(j=0,ColList='0';j<ROW;j++,ColList++)
{
cout << endl << ColList << "| ";
for(k=0;k<COL;k++)
{
cout << setfill(' ') << setw(8) << CellGrid[j][k] << setw(7) << " | ";
}
cout << endl << setfill('_') << setw(77) << '_';
cout << endl;
}
cout << endl << endl;
}
Last edited on
Topic archived. No new replies allowed.