c++ - Printing a value for the space character? -


I am creating a program to translate from morse code into English, using a series of conditional statements Using the function:

  Zero English (four lesson 1) {if (text1 == 'a' || text1 == 'A') {cout & lt; & Lt; ".-";} And if (lesson 1 == 'b' || lesson 1 == 'b') {cout & lt; & Lt; "-...";} . Else if (text1 == 'z' || text1 == 'Z') {cout & lt; & Lt; "- .." else if (text1 == '') {cout & lt; & Lt; "/";}}   

is a very simple problem when I have a space character in the input, so I can not do anything to print my program; It should be printed slash I have tried else if (text1 == '') instead of else if (isspace (text1) , but with no luck.

The problem is not in the function for which you have posted the code. The problem is in the code that the input reads, for example, you might need to use a Strered :: Holline (cine, line) so that the white space is completely intact, or maybe easy, one letter at a time Receive:

 for  (four f; Cin.get (ch);) {English (ca); }    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -