This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/cplbexam/string/pubfun/poslen.cpp

15 lines
378 B
C++

#include <string.hpp>
void main( void ) {
String s ("Open Watcom C++ compiler");
int pos = 14;
int len = 4;
cout << "The original string: \"" << s << "\"" << endl;
cout << "The string starts at offset " << pos << " with the length "
<< len << " of the original string: \"" << s.operator ()( pos, len )
<< "\"" << endl;
}