Segmentation fault (core dumped) using boost::split in C++ -
i have std::string wktstring:
projcs["osgb 1936 / british national grid",geogcs["osgb 1936",datum...
and trying split string
#include <boost/algorithm/string.hpp> ... std::vector<std::string> proj_list; boost::split(proj_list, wktstring, boost::is_any_of("[")); std::cout << "split finish";
and when compile have segmentation fault before "split finish". why?
definitely need more information. program compiles , runs w/o error:
#include <iostream> #include <vector> #include <boost/algorithm/string.hpp> int main () { std::string wktstring = "projcs[\"osgb 1936 / british national grid\",geogcs[\"osgb 1936\",datum..."; std::vector<std::string> proj_list; boost::split(proj_list, wktstring, boost::is_any_of("[")); ( int = 0; < proj_list.size(); ++i ) std::cout << proj_list[i] << std::endl; }
Comments
Post a Comment