getch()
下面这个程序为什么有警告?谢谢!
#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
int c;
c=getch();
if(c=='1')
cout<<"aaaa"<<endl;
}
int _getch( void );Get a character from the console without echo (_getch)
int getchar( void );Read a character from stdin.
LZ是不是把这两个函数弄混淆了,
c=getch()改成 c=_getch();或c=getchar()就可以了.