hi everyone, i just decided to learn c++ this summer so i'd be ahead of (most) people when i go back to school. i've only just started and as a first project i want to make a program that will convert text characters to their binary numbers and vice versa. the first programming language i learned was turing and it had a nice little feature that allowed you to use a char (they called them strings) kinda like an array. you could get a variable and look at each individual character within it as well as determine the length (how many characters). i was hoping to find out if c++ had something similar to this. here's how i figure my program will be:
- get input from user
- look at first character in user's input and compare it to a list of if statements, then assigning the matching binary number to another char that it will output to the screen once all binary numbers have been determined.
i hope i've explained my problem well enough for you to understand it and help me. remember, i'm not looking for anyone to write my program for me (what would be the point in that? i'm doing this for myself), i'm just trying to find out if i can look at each character in a variable.
please let me know if you have trouble understanding this... or if you've got an answer