I'm new to C, and I'm having a bit of trouble figuring out the exact way to do this.
I need to iterate through a string and store each letter one at a time in order to decrypt it.
So what I'm doing is:
#1. Creating a place to store the string:
char toDecrypt[] = node->string;
#2. Starting the for loop:
for(int m=0; m< strlen(toDecrypt); ++m)
#3. Storing the char (to be decrypted later):
char i = toDecrypt[m];
So is the above valid, or should I be using a different notation to properly store the char?
EDIT:
Ok, I think I have that cleared up, so I just have one follow up question.
How do I check to see if a char is a "\"? My check doesn't seem to be working.
When I put
toDecrypt[m] != '\';
into an if statement, it doesn't work...