Can any one help me put my pointer by gotoxy function inside the matrix that,s like as below:
void gotoxy( short x, short y ) // function to handle position of cursor on the screen
{
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
COORD position = { x, y };
SetConsoleCursorPosition( hStdout, position );
}
int main()
{
int row;
int col;
int *array[row][col];
cout<<"Enter value of row and column for square matrix:"<<endl;
cin>>row;
cout<<endl;
cout<<endl;
col=row;
int count=0;
for (int i = 1; i <= row; i++)
{
cout<<"|";
for (int j = 1; j <= row; j++)
{
cout<<"---";
for(int k=0;k<=count;k++)
{
cout<<"|";
}
}
cout<<endl;
}
system("pause");
return 0;
}