Emergency Vector Problem?

Hey! I'm again having difficulties with vectors. I was really close at one time, however, I am having difficulty with a specific portion of the below code. Unfortunately, every time my program runs, when it reaches the point of comparison between char values of both vectors, it says: "Program received signal: 'EXC_BAD_ACCESS'".

PLEASE HELP?
Last edited on
What values do you enter to provoke the error?
Never mind.

I figured it out! :)


My issue was a bad pointer, caused by changing the pointer value, while also trying to reference the old value of the pointer. The code I wrote set the variable to two different values at the same time, while also trying to reference an index in the vector through the use of the pointer!

I figured this out and then switched the 'for' loop that used the pointer, to a 'while' loop instead, eliminating the faulty code and fixing the issue!

Thanks though for being prepared to help me. :)

By my reckoning, if you enter no input (i.e. | both times) you get a seg fault on line 109.
Topic archived. No new replies allowed.