cpp_prac/morse/main.cc
2025-01-12 15:22:13 +01:00

12 lines
394 B
C++

#include "morse_code.h"
#include <iostream>
int main() {
Morse_code mc{"morse.def"};
std::cout << mc.encode("Hello Morse") << "\n"; // .... . .-.. .-.. --- -- --- .-. ... .
// std::cout << mc.decode("... --- ...") << "\n";
// std::cout << mc.decode(".... ----") << "\n"; // ---- is not a valid code
// std::cout << mc.decode(mc.encode("loopback test")) << "\n";
//
}