I couldn't succeed on doing that. Here's basic parts of my code that i tried to read certain rows within a vector and tried to write them into another vector..
But when i run this code, i've got "Segmentation Fault" all the time. Why do i get it? I couldn't understand that..
By the way, this loop of logical state skips every first element that comes after reading rows which i want to store. So it reads rows like "74, 76, 78, ... 104".
Does QLT.size() == 0 at line 1? Vectors don't grow automatically by writing outside their bounds, you have to grow them explicitly by calling resize(), push_back(), or emplace_back(). You should change lines 6 and 7 to
By the way, check your editor settings. It's mixing tabs and spaces, which is frowned upon by most people. For example, it makes your formatting unreadable on this site.
I tried "Push back" but Values couldn't be written on the screen. After that i just tried what i do in matlab all the time. I thought it could work but it did not.. I didn't know ".back()" part of code. Thank you very much for helping me. Its working now.
Apologize but I dont understand? What do you mean "mixing tabs and spaces" ? I use Code::Blocks as an Editor in Linux. I did look settings but couldn't see anything related to this