class Zeichenkette { private: std::string objekt; public: Zeichenkette( char const* text ) : objekt( text ) {} char gib_zeichen( size_t position ) const { return objekt[ position ]; } void ersetze( size_t position, size_t laenge, Zeichenkette const& ersatz ) { return objekt.replace( position, laenge, ersatz.objekt ); } /* ... */ };
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter