console gibt Smiley aus

Ich habe diesen Code:

#include "stdafx.h"
#include <iostream>

typedef struct{
    int s1;
    int s2;
    char c1;
    char* arr;
}inner_struc;


int _tmain(int argc, _TCHAR* argv[])
{
    inner_struc myinner_struct;
    myinner_struct.s1 = myinner_struct.s2 = 3;
    myinner_struct.c1 = 'D';
    char arr[3] = {1,2,3};
    myinner_struct.arr = arr;

    std::cout << "first array element: " << myinner_struct.arr[1] << std::endl;
    return 0;
}

Ich frage mich, warum ich ein Smiley-Gesicht anstelle des ersten Array-Elements bekomme! was mache ich hier falsch Es kompiliert und läuft gut, aber die Ausgabe ist

erstes Array-Element: "smiley face"

Was bedeutet das? Ich benutze Visual Studio 2010. Danke

Antworten auf die Frage(3)

Ihre Antwort auf die Frage