U E D R , A S I H C RSS

Map/권정욱

Map/권정욱


맵 프로그래밍

~cpp 
#include <iostream>
#include <map>
#include <fstream>
#include <string>
using namespace std;

int main(){
	ifstream fin("line.txt");
	
	map<char, char> order;
	order['a'] = 'D';
	order['$'] = 't';
	order['9'] = 'p';
	order['*'] = 'k';
	order['m'] = 'n';
	order['i'] = 'l';
	order['x'] = 'W';
	order['d'] = 'o';
	order['='] = 's';
	order['z'] = '!';
	order['-'] = 'u';
	order['@'] = 'e';
	order['y'] = 'a';
	order[' '] = ' ';

	char line;

	int i = 0;
	while(!fin.eof()){
		fin.get(line);
		cout << order[line];
	}
	cout << endl;
	return 0;
}

STL실습
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:43
Processing time 0.0086 sec