Home > Back-end >  Conio. H use (failure)
Conio. H use (failure)

Time:01-19

# include & lt; Conio. H>
# include & lt; iostream>
using namespace std;
Int main ()
{
Char q;
Getch (q);
Cout & lt; return 0;
}
//the last compilation errors
//what's the problem?

CodePudding user response:

Reference:
 # include & lt; Conio. H> 
# include & lt; iostream>

using namespace std;
Int main ()
{
Char q;
//getch (q);//function prototype: int getch (void);
Q=getch ();//read from the console one character at a time, but don't show on the screen (not to show)
Cout & lt; <" 1 "& lt;
return 0;
}

The function name: getch ()
The header file: conio. H
Can work: read a character from the console, but does not display on the screen (not to show),
Perform to getch () function, the cursor flashing, waiting for the input character: the input character, and can't see your character input, screen is still; But moments after input, getch () function will read and assigned to the q,

CodePudding user response:

Compile error information will tell you what problem,

CodePudding user response:

Conio is written by yourself
  • Related