C Run-Time Error R6019

unable to open console device

The program called a console function declared in CONIO.h, but the operating system did not grant access to the console.