con std::string e char
con std::string e stringcodice:std::string stringa(str, str+7); // ti prende il primo STRINGA std::cout << stringa.c_str() << "\n";
codice:std::string str("STRINGA#stringaSTRINGA"), stringa("NULL"); unsigned int loc = str.find_first_of("S", 0); unsigned int floc = str.find_first_of("#", 0); if(loc != std::string::npos && floc != std::string::npos){ std::string stringa(loc, floc-1); }