int main() { ifstream f; int sum=0; int temp[5]; f.open("E://aa.txt",ios::in); char c; int num[5]; char num2[5]; int j=0; while(!f.eof()) { c=f.get(); cout<<c<<" "; num[j]=c; j++; } for(int i=0;i<5;i++) { num2[i]=num[i]; temp[i]=(int)num2[i]; cout<<temp[i]<<" "; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)