I was writing a program in C++ to input values for a NxN matrix. Generally, one would enter an integer and press the Return key for NxN times. But I would like to make the cursor move the length of a tab for every value entered by the user. This carries on for a row, and then a new line is prompted for inputs for the next row. I am aware of using curses.h for such an implementation, but haven't figured out how to implement it. 

Thanks.

```
#include <ncurses.h>
#include <iostream>

using namespace std;

int main()
{
  char ch[10];
  int array[4][4];
  initscr();
  raw();
  keypad(stdscr, TRUE);
  echo();

  printw("Enter elements a 4x4 array: \n");
  for(int i=0;i<4;i++) {
    for(int j=0 ; j<4; j++) {
      getstr(ch);
      array[i][j]=atoi(ch);
      addch('\t'); // This is executed after the newline return is received
      refresh();
    }
    addch('\n');
  }

  getch();
  endwin();
  return 0;
}

```