
#include <iostream>

using namespace std;

// Funktionsprototyp
void TextAusgeben(char text[]);

int main()
{
    char* einText = "Hallo";
    // ich hätte genauso schreiben können
    // char einText[] = "Hallo";

    cout << einText;
    cout << endl;
    // Diese Funktion soll das gleiche machen
    // wie cout << einText
    TextAusgeben(einText);
    cout << endl;

    return 0;
}

// TextAusgeben Funktionsdefinition
void TextAusgeben(char text[])
{
    int index = 0;
    while(0 != text[index])
    {
        // einzelnes Zeichen ausgeben
        cout << text[index];
        // Index um eins erhöhen
        index++;
    }
}