Пример #1
0
int main(){
  MeinString h("Haallllooooooo");
  MeinString b;
  b=h;
  cout<<(b.c_str())<<endl;
  cout<<b[1]<<endl;
  cout<<b<<endl;
}
Пример #2
0
void anzeigen(std::ostream& os, const MeinString& m)  {// Version 2
        os << m.c_str();
}
Пример #3
0
void  MeinString::verketten(const MeinString& a, const MeinString& b) {
   reserve_only(a.len + b.len); // neuen Platz beschaffen
   strcpy(start, a.c_str());             // Teil 1 kopieren
   strcpy(start + a.len, b.start);  // Teil 2 kopieren
   len = a.len + b.len;
}