Simple Caesar cyptography

This is a discussion on Simple Caesar cyptography within the C Programming forums, part of the General Programming Boards category; Hey guys I am working on implementing a simple cryptography program called Caesar. I got this program to work perfectly ...

Simple Caesar cyptography

Hey guys I am working on implementing a simple cryptography program called Caesar. I got this program to work perfectly when I was writing a function to handle the cryptography and just declaring the string that I wanted to encrypt and the integer I wanted to move the letters by to encrypt it. maybe you can help me out and tell me what I am doing wrong here. I am just trying to get the user to enter the key into main and then be prompted for the string to encrypt.

I ended up with a segmentation fault.. I have absolutely no idea what I am looking at but when I ran GDP I get this

ok so I replaced the getString portion of the code with simply declaring a string called "word". That way I could determine if that was the issue. Apparently it is not because I am still getting a segmentation fault. So it has nothing to do with GetString. Instead it has do with "k". Can someone please tell em what is wrong with how I have written the main function and k?

You don't. It is not your place to decide that nobody else should benefit from finding the same problem and solution at a later date.
The more courteous posters actualy post what the cause and solution was.

sorry I just read this.. the solution was that I was not inputting the initial values into the main function right. I thought that I type ./caesar and press enter and then it will prompt me for the input to main. I did not realize I had to type it like ./caesar input.