Why can't I make an int array using 'const int*' same as 'const char*'?

Viewed 1026

Why can I create a string or array of chars in this way:

#include <iostream>
int main() {
  const char *string = "Hello, World!";
  std::cout << string[1] << std::endl;
}

? and it outputs the second element correctly, while I can't make an array of integer type without the array's subscript notation [ ]? What's the difference between the char's one and this one: const int* intArray={3,54,12,53};.

4 Answers
Related