added ws202425 courses

This commit is contained in:
2024-11-14 13:11:04 +01:00
parent 800282c2e8
commit beb31897b1
461 changed files with 20368 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
/* Informatik B - Sommersemester 2023
Vorlesung am 28.04.2023
Katharina Klost
Beispiele zu Strings
*/
#include <iostream>
#include <string>
int main(){
std::string ein_string = "Hallo";
char stelle2 = ein_string[2];
std::cout << "An index 2 steht: " << stelle2 << std::endl;
ein_string[2]= 'x';
std::cout << "Stelle 2 verändert: " << ein_string << std::endl;
ein_string = ein_string + " Welt!";
std::cout << ein_string << std::endl;
std::cout << ein_string + 'c' << std::endl;
std::cout << "Der String \"" << ein_string << "\" hat " << ein_string.length() << " Zeichen" << std::endl;
}