This is Morse code.
I get an error message too many initializers for char b[]. How can I get rid of this error?
#include<iostream>
using namespace std;
int main(){
char a[72]={'A','a','B','b','C','c','D','d','E','e','F','f','G','g','H','h','I','i','J','j','K','k','L','l','M','m','N','n','O','o','P','p','Q','q','R','r','S','s','T','t','U','u','V','v','W','w','X','x','Y','y','z','Z','0','1','2','3','4','5','6','7','8','9','.',',','?','\'','!','/','(',')','&','@'};
char b[]={".-",".-","-...","-...","-.-.","-.-.","-..","-..",".",".","..-.","..-.","--.","--.","....","....","..","..",".---",".---","-.-","-.-",".-..",".-..","--","--","-.","-.","---","---",".--.",".--.","--.-","--.-",".-.",".-.","...","...","-","-","..-","..-","...-","...-",".--",".--","-..-","-..-","-.--","-.--","--..","--..","-----","-----",".----",".----","..---","..---","...--","...--","....-","....-",".....",".....","-....","-....","--...","--...","---..","---..","----.","----.",".-.-.-",".-.-.-","--..--","--..--","..--..","..--..",".----.",".----.","-.-.-","-.-.--","-..-.","-..-.","-.--.","-.--.","-.--.-","-.--.-",".-...",".-..."};
char c[40];
cout<<"Enter code ";
cin.getline(c,40);
for(int i=0;i<1;i++){
for(int j=0;j<72;j++){
if(b[j]==c[i]){
cout<<a[j];
}
}
}
return 0;
}