①输入对应字符,int t = a[i],即可得到对应asicc码
②#include <string> string str; getline(cin,str);
③cout << str<<endl;
// PAT B1093输出两个连接字符串,要求重复字母不输出.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <algorithm>
#include <math.h>
#include <iostream>
using namespace std;
const int maxn = 1000010;
int tag[128];
int _tmain(int argc, _TCHAR* argv[])
{
string str,str1;
fill(tag,tag+128,-1);
getline(cin,str);
getline(cin,str1);
for(int i = 0;i<str.size();i++){
int u =str[i];
if(tag[u] == -1){
printf("%c",str[i]);
tag[u] = 1;
}
}
for(int i = 0;i<str1.size();i++){
int u =str1[i];
if(tag[u] == -1){
printf("%c",str1[i]);
tag[u] = 1;
}
}
printf("\n");
system("pause");
return 0;
}