密碼程序不能正常工作...即時通訊工作與dev C++它劑量識別conio.h ...請幫助...我做了什麼??也許我有另一個錯誤。 ..請將其糾正.tnx密碼程序不工作在c + +
#include<string.h>
#include<iostream>
#include<stdio.h>
#include<conio.h>
using namespace std;
void main()
{
char pass[5];
int o;
string password= "password";//this is the password
for(int i=0;i<5 ;i++)
{
pass[i]=_getch();
_putch('*');
}
string a(pass);
if(a==password)
{cout<<"correct"<<endl;}
else
{cout<<"wrong"<<endl;}
}
這個程序是C和C++的一個可怕的組合,用於嚴重過時的編譯器。我懇求你拿起一本[體面的,最新的C++書](http://stackoverflow.com/q/388242)並從中學習。 –