I have created a multimap for my road points. The key refers to the road number and the values are vec3 points that make up the road.
I am trying to iterate through the values of each key point and create a road segment at each point on the road (except the last), adjust the values to be on the road points and then store them in a std::vector.
The RoadSegment constructor creates 6 vec3 points and pushes them onto a std::vector.
I have a segmentation fault in the line marked in bold
[for(mapIt = it.first; mapIt != it.second; ++mapIt)]
When i take out the lines creating the new objects and pushing them onto the std::vector it works fine.
Can anyone tell me what the problem is / a solution to the problem??