I would like to make some kind of program in C to encode and decode messages,now I successfully made the decoder,all I want it to do is if I ex. type "Hello" into an input.txt file I want it to print it as the letter's position in the alphabe as "8 5 12 12 15" to an output.txt file.All I did until now was I made a pretty simple decoder:
if(a==1)
printf("a");
if(a==2)
printf("b");
and so on... and I assigned space as 11111 in the decoder. I am pretty new to C,I only learn it in school and have very basic knowledge.If anybody would be willing to explain it I would be very grateful.I would like to do it with a dictionary if possible.ex. [a]=1 [b]=2 so that if I want to I could change their number values.