cpp_prac/morse/morse_code.h

17 lines
334 B
C
Raw Permalink Normal View History

2025-01-12 15:22:13 +01:00
#pragma once
#include <string>
#include <map>
#include <fstream>
2025-01-12 15:50:45 +01:00
#include <iostream>
#include <algorithm>
#include <sstream>
2025-01-12 15:22:13 +01:00
class Morse_code
{
public:
Morse_code(std::string filename);
std::string encode(const std::string &str);
2025-01-12 15:50:45 +01:00
std::string decode(std::string str);
2025-01-12 15:22:13 +01:00
private:
std::map<char, std::string> morse_map;
};