Thanks for everything!
Type: Posts; User: aleflow7
Thanks for everything!
Ok, I've only changed simpleEncrypt, medium and ultra are still like when I started.
Header:
/*!
* Replaces each letter in the character array wih its next lexicographical
* letter.
* ...
Ok, my main code looks like this now. Also for some reason when I input 's' as a encryption type it outputs
Original word is: good
Segmentation fault
But when I try to do 'm' or 'u' the program...
Ok, now I'm getting a warning: passing arg 1 of 'simpleEncrypt' makes pointer from integer without a cast. What does this mean? And when I run the program I still get a segmentation fault. I think my...
So you're saying to have something like:
void simpleEncrypt(char input[])
{
int i, len = strlen(input);
//for loop goes through all the characters in input and adds 1 to the ascii value
...
Thanks for the help again, but I can't seem to figure this out. If I am using a string (char*) and I increment a value in the string (string[0]++) am I incrementing the ASCII value for the char? Or...
Sorry for the weird wording, it appears my problem had to do with the way I was getting the input. But now I get a segmentation fault when I run. Could you guys help me spot where I am causing this?...
Thanks a lot guys! I finally got it to compile so now I have a lot of debugging to do!
What I think I'm doing when I do.
input[i] = (int)input[i];
input[i]++;
Is taking the ascii value...
Ok, so to compile the whole file would I do:
gcc -S lab2.c
gcc -c lab2.s
gcc encrypt.c lab2.c
gcc lab2.o
gcc -o lab2 lab2.o
and then finally run it with lab2?
Thank you so much!
I'm new to C and need some help figuring out this error.I've only just started coding my main function but decided to compile it to test it; I get this error.
Undefined first referenced
...