Iterating through a 2D vector using one use case of for loop gives segmentation fault
I needed to write a simple method that calculates the highest element in a matrix data (implemented in this case using a 2D vector). Inside the method, initially, I was accessing each element in the 2D vector using the one form (the most common one) of for loop which gave a "segmentation fault". Unfortunately, I… Read More Iterating through a 2D vector using one use case of for loop gives segmentation fault