I'm currently working on the reflect function, I'm going to include my code below
What problem are you having? Describe the problem in detail. If appropriate, include any error messages, screenshots, or small snippets of code to describe the issue. (Keeping in mind the course's policy on academic honesty, do not share code that may contain spoilers or solutions.) So your are seeing my code above and it's compiling without error messages. But when im running it, I'm returning an unswapped image. Im hoping I have delt with the problem that I have been running over "too much" of the line, thus only iterating over half of it now and coding different algorithms for even and uneven lengths of arrays. So I'm sure it has something to to with the way I'm using the data. Since here, I'm just creating copies and do not change the actual data.What have you already tried so far to resolve the issue?I tried implementing my code in a similar fashion like we saw in the lecture:
RGBTRIPLE tmp = *image[i][j]; *image[i][j] = *image[i][h]; *image[i][h] = tmp;
But that returns the following errormessage if I compile the code:
error: indirection requires pointer operand ('RGBTRIPLE' invalid) RGBTRIPLE tmp = *image[i][j]; and for the other lines respectively. I'm doing something wrong here but I'm not sure what!