Skip to main content
edited body
Source Link
Jot
  • 3.3k
  • 1
  • 14
  • 21

You are almost there:

  • Use a char* instead of char, a char can only contain one character
  • Use " instead of ' (Thanks Juraj)

ThanThen you get:

const char* months[] =
 {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

You are almost there:

  • Use a char* instead of char, a char can only contain one character
  • Use " instead of ' (Thanks Juraj)

Than you get:

const char* months[] =
 {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

You are almost there:

  • Use a char* instead of char, a char can only contain one character
  • Use " instead of ' (Thanks Juraj)

Then you get:

const char* months[] =
 {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
added 15 characters in body
Source Link
Michel Keijzers
  • 13k
  • 7
  • 43
  • 59

You are almost there:

  • Use a char* instead of char, a char can only contain one character

    Use a char* instead of char, a char can only contain one character
  • Use " instead of ' (Thanks Juraj)

    const char* months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };

    Use " instead of ' (Thanks Juraj)

Than you get:

const char* months[] =
 {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

You are almost there:

  • Use a char* instead of char, a char can only contain one character

  • Use " instead of ' (Thanks Juraj)

    const char* months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };

You are almost there:

  • Use a char* instead of char, a char can only contain one character
  • Use " instead of ' (Thanks Juraj)

Than you get:

const char* months[] =
 {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
added 15 characters in body
Source Link
Michel Keijzers
  • 13k
  • 7
  • 43
  • 59

You are almost there:

const char* months[] =
 {'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'};
  • Use a char* instead of char, a char can only contain one character

  • Use " instead of ' (Thanks Juraj)

    const char* months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };

You are almost there:

const char* months[] =
 {'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'};

You are almost there:

  • Use a char* instead of char, a char can only contain one character

  • Use " instead of ' (Thanks Juraj)

    const char* months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };

Source Link
Michel Keijzers
  • 13k
  • 7
  • 43
  • 59
Loading