Skip to main content
1 of 2
Shashi Bhushan
  • 1.5k
  • 3
  • 17
  • 20

How to Initialize a char array inside a class?

I was about to initialize a char array inside a class as Class a{ char a[25]; }; a::a(){ a[] = {'a','b','c'}; }

but gives compile time error.

Shashi Bhushan
  • 1.5k
  • 3
  • 17
  • 20