from class string exctract substring using specified length in c++ from a paticular position code example Example: string substr c++ s.substr(pos,len);