12 lines
394 B
C++
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";
|
|
//
|
|
}
|