English 中文(简体)
将修正值解码到字母
原标题:decoding morse value to alphabet
  • 时间:2012-05-23 13:32:40
  •  标签:
  • c++

我试图将模版代码解码成英文本。 基本上我从文件中获得线条串, 并排出我的显示, 比如

I 之间有代码间的空间, 我应在模版代码旁边除上层空格外, 任何其它的查拉机都要有空格。 我有棵树, 包含模类和相关的模版码, 我手动测试过它返回字母。 但问题是解码部分读每个模码, 并传给我从模版转换成字母。 请让我绝望。 任何提示 。

最佳回答

它看起来像一个家庭作业问题, 你应该把它标记为 @homework if so.

You should have a binary tree that maps the letters to nodes where one side symbols * and the other side symbols - . Each node should have: LeftChild, RightChild, Letter.

要分析文本, 您应该获得每个字符并绕过 Morse 代码树, 直到您到达一个空格。 当您到达一个空格时, 您应该在节点中找到字母, 然后从树根重新开始 。

也该有一个字句结尾的字符, 是不是L?

如果你提供更多信息, 人们可以帮助你...

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签