www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Using scanw Ncurses in D lang

reply Gabol <gabriellucena337 outlook.com> writes:
how can I use the scanw() function; of the ncurses of the 
deimos.ncurses project since the conventional mode does not work
example: scanw("% i", & number); // The compiler accuses error.

Error: function deimos.ncurses.curses.scanw(char* fmt, ...) is 
not callable using argument types (string, int*)
source/app.d(8,14):        cannot pass argument "0" of type 
string to parameter char* fmt
/usr/bin/dmd failed with exit code 1.
Jun 15 2019
parent ag0aep6g <anonymous example.com> writes:
On 15.06.19 23:20, Gabol wrote:
 example: scanw("% i", & number); // The compiler accuses error.
 
 Error: function deimos.ncurses.curses.scanw(char* fmt, ...) is not 
 callable using argument types (string, int*)
 source/app.d(8,14):        cannot pass argument "0" of type string to 
 parameter char* fmt
 /usr/bin/dmd failed with exit code 1.
Off topic: The string literal in the error message is wrong. It's "0" when it should be "% i". I've made a PR to fix it: https://github.com/dlang/dmd/pull/10040
Jun 15 2019