Michael Planner
/
InitListen
Codeschnippseln für diese Übung
Diff: class4.cpp
- Revision:
- 2:7a0bae2281e8
- Parent:
- 1:c65875995efb
--- a/class4.cpp Tue Oct 13 16:34:21 2020 +0000 +++ b/class4.cpp Tue Oct 13 16:45:15 2020 +0000 @@ -29,13 +29,18 @@ pc->printf("Auflistung beendet!\n\n"); } - void PrintString(char *str, int count) + void PrintString(char *str) { pc->printf("String: "); + int i = 0; - for (int i = 0; i < count; i++) + while(true) { + if (str[i] == '\0') + break; + pc->putc(str[i]); + i++; } pc->printf("\n");