Translator problems (again)

This is a discussion on Translator problems (again) within the C++ Programming forums, part of the General Programming Boards category; I am trying to encode and decode user inputted text, and from a file. I have the "language" all written, ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    59

    Translator problems (again)

    I am trying to encode and decode user inputted text, and from a file. I have the "language" all written, but I don't know how I would apply it to the code. I have written the general layout for the file, it just doesn't do what I want it to. Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    dable_yayooh == w
    yayooh == u
    Uhm, I pronounce my U's and W's as "yoo" and "dub-ul yoo". Your system though, w/e.

    I have the "language" all written, but I don't know how I would apply it to the code.
    it just doesn't do what I want it to.
    Just looking at your code briefly, and your vague question, what you want to do is be able to open the alphabet file and decode text/files using it?

    Well, first thing you would have to do is load the alphabet file, parse it line by line, loading it into some kind of data structure, then ask for the input, text/file. As you read through the input, you need to search your structure and find the right text to encode/decode the input.
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  3. #3
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    i made something like that not too long ago

    1337Translato!
    lol dont make fun of me plz


    here is the code for it.. maybe it would help

    BTW it has Binary translation too:
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    59
    I made it "yayhoo" because "you" would be easier to understand.
    Thank you mrafcho001. That really helped a lot!

  5. #5
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    Sure man.. IM if you need more help

  6. #6
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    Quote Originally Posted by mrafcho001
    i made something like that not too long ago

    1337Translato!
    lol dont make fun of me plz


    here is the code for it.. maybe it would help

    BTW it has Binary translation too:
    You realize every place you did an "if (letter == symbol) cout << symbol, L33tblah << symbol, you could have just had a global "else" clause that did cout << letter and L33tblah << letter?

    That'd have saved you a LOT of lines of code.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21