My code is supposed to interleave two arrays of chars. I think I have nailed it down. I feel that the way I am doing it might be a bit to complex so if anyone has pointers on how I can simplify my code that would be great. But my main question is when I run the code I get a runtime error.
"Exception thrown at 0x00F624A1 in "assignment.exe": 0xC0000005: Access violation reading location 0x00000005.
If there is a handler for this exception, the program may be safely continued."
I'm new to C++ and trying to learn but I am lost at why it gives me this. Here is the function that is supposed to interleave the arrays.
Thank you for replying. My only issue that I am a bit lost on is why are you taking the modulo of the count and the length of the arrays? In my mind this only works for arrays that are less than 10 indexes long anything bigger and the index will reset back to 0.
Edit: My bad I redid the math and kind of see where you are going with it.