|
|
const char name[ 16 ] = "Albert Einstein";
int main()
You have { } but not int main try adding that then compiling also I don't think you can output like that in c although I have never tried it. I think the correct form would be name not name[] or are you trying to output the first character? that would be name[ 0 ];
|
|
|
|
@giblit Also it should be a const char and you should also put a size + 1 for the size of the char since the string ends in a null terminating character. const char name[ 16 ] = "Albert Einstein"; |
For compatibility with the C standard library and the C Unicode TR, the C++ standard library provides the 25 C headers, as shown in Table 154. Table 154 — C headers <assert.h> <inttypes.h> <signal.h> <stdio.h> <wchar.h> <complex.h> <iso646.h> <stdalign.h> <stdlib.h> <wctype.h> <ctype.h> <limits.h> <stdarg.h> <string.h> <errno.h> <locale.h> <stdbool.h> <tgmath.h> <fenv.h> <math.h> <stddef.h> <time.h> <float.h> <setjmp.h> <stdint.h> <uchar.h> |