firebird sources fgets input line. it is necessary that when calling a function in the console a string has already been entered that the user can edit. I myself have not yet caught up. Prompt the method, well, or another way of reading that will allow to perform this functionality. The ability to respond to the console by pressing the tab key is welcomed, for example, the user has moved the cursor to the right place and pressed TAB immediately ends input, and we get a string from the console and the cursor position. thank

  • what OS? Cross-platform hardly work out. - pavel
  • in my case, win 64x, standard library stdio - Semyon Romanov
  • msdn.microsoft.com/ru-ru/library/ ... these set the position of the cursor. Tab catch is not difficult. Get the same thing. - pavel
  • You can use \n without \r - then the cursor "runs" at the beginning, then we write so much that the cursor would remain in the place where it was (cross platform). - nick_n_a
  • If under Windows - you can be confused by WriteConsoleOutputxxxx - there is a family of output functions. - nick_n_a

1 answer 1

What is required is to output a string (for editing) to the screen input buffer of the console, solve the problem using WriteConsoleInput! Thanks to all!