1 Replies - 3393 Views - Last Post: 29 March 2011 - 01:44 PM Rate Topic: -----

#1 morti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 29-March 11

how can I translate between plain text and Morse code

Posted 29 March 2011 - 01:36 PM

#include <iostream>
#include <cstring>
#include <string>
#include "iodos.h"
using namespace std;

int main()

dos_console();


textin.length() == bokst[i], morse[i];
{".-", "-...", "-.-.", "-..", ".", "..-.", "--.",
"....", "..", ".---", "-.-", "-..", "--", "-.",
"---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-",
".--", "-..-", "-.--", "--..",
".--.-", ".-.-", "---."};

cout << "Skriv in text som du vill översätta till morse" << endl;
getline(cin, textin);

cout << "Översatt till morse blir det" << endl;

for (int i=0; i<textin.length(); i++)
{
textin.length() == bokst[i], morse[i];

cout << morse[textin[i]];
}

Is This A Good Question/Topic? 0
  • +

Replies To: how can I translate between plain text and Morse code

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 3845
  • View blog
  • Posts: 11,735
  • Joined: 25-December 09

Re: how can I translate between plain text and Morse code

Posted 29 March 2011 - 01:44 PM

I think you should probably start by reading this tutorial from the Introduction through at least the link titled arrays. Or find a basic C/C++ Tutorial on the web that is written in your native language.

Jim
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1