More actions
imported>Unknown No edit summary |
(Repair batch-0002 pages from live compare) |
||
| Line 15: | Line 15: | ||
map<char, char> map1; | map<char, char> map1; | ||
map1 | map1['a'] ='D'; | ||
map1 | map1['$'] ='t'; | ||
map1 | map1['9'] ='p'; | ||
map1 | map1['*'] ='k'; | ||
map1 | map1['m'] ='n'; | ||
map1 | map1['i'] ='I'; | ||
map1 | map1['x'] ='W'; | ||
map1 | map1['d'] ='o'; | ||
map1 | map1['='] ='s'; | ||
map1 | map1['z'] ='!'; | ||
map1 | map1['-'] ='u'; | ||
map1 | map1['@'] ='e'; | ||
map1 | map1['y'] ='a'; | ||
map1 | map1[' '] =' '; | ||
ifstream fin("input.txt"); | ifstream fin("input.txt"); | ||
| Line 35: | Line 35: | ||
while(fin.get(ch)) | while(fin.get(ch)) | ||
{ | { | ||
cout << map1 | cout << map1[ch]; | ||
} | } | ||
cout << endl; | cout << endl; | ||
| Line 41: | Line 41: | ||
} | } | ||
---- | ---- | ||
STL실습, 데블스캠프2004/목요일 | |||
Latest revision as of 00:16, 27 March 2026
#include <vector>
#include <map>
#include <iostream>
#include<fstream>
using namespace std;
struct student
{
string name;
int score;
};
int main()
{
map<char, char> map1;
map1['a'] ='D';
map1['$'] ='t';
map1['9'] ='p';
map1['*'] ='k';
map1['m'] ='n';
map1['i'] ='I';
map1['x'] ='W';
map1['d'] ='o';
map1['='] ='s';
map1['z'] ='!';
map1['-'] ='u';
map1['@'] ='e';
map1['y'] ='a';
map1[' '] =' ';
ifstream fin("input.txt");
char ch;
while(fin.get(ch))
{
cout << map1[ch];
}
cout << endl;
return 0;
}
STL실습, 데블스캠프2004/목요일