I am getting this error after providing the input for plaintext:

jharvard@appliance (~/Dropbox/pset2): ./caesar 3
Segmentation fault (core dumped)
  • many causes. hard to tell exactly without seeing some code. – kzidane Jun 30 '15 at 17:44

I think the physical cause is that you are trying to write some space in memory which doesn't exist or which cannot be accessed.

In particular for your problem, it's impossible to know without more details what is causing the segmentation fault. However if I had to guess, I would think you are trying to write into a string variable through a function (which is impossible without using pointers, which you'll see in the following lessons) or are having conflicting string lengths.

Sorry I cannot be more helpful!

Not the answer you're looking for? Browse other questions tagged .