Skip to content

rafaelcn/morse-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose

Implement a simple encoder/decoder of Morse code.

Building

You gonna need a C++ compiler complacent with the fourteenth standard (C++14) and maybe CMake if you will.

Building with CMake

To build with CMake it is pretty straight forward, you just need to do:

cmake ./
make

Building without CMake

You can either compile it directly with the compiler in hands

g++ -Wall -pedantic -std=c++14 src/main.cpp src/morse.cpp -o bin/morse.out

Or you can open the source files on a IDE of choice and compile them.

What you can do with it?

Encode latin words to morse, decoding morse code is also possible but you should have in mind that each morse character should be separated by a space.

Examples

$ ./bin/morse --encode Rafael Campos Nunes
Result: .-..-..-..-..-.. -.-..---.--.---... -...--.....

The encode function just separate words and not letters, so it should be a bit difficult to decode the message. On the other hand decoding information will give you a scrambled result, with each letter separated by a space character.

$ ./bin/morse --decode .-. .- ..-. .-
Result: r a f a

About

Encoder and decoder of morse code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published