+ 5

How to declare an array using elements in ©++

C++ involves me to love the codes and other programming languages like php web based .

25th Jan 2018, 2:30 PM
Jefferson Ayopela
Jefferson Ayopela - avatar
2 ответов
+ 4
OK it helps a lot
25th Jan 2018, 2:56 PM
Jefferson Ayopela
Jefferson Ayopela - avatar
+ 2
//array of integers int arr[] = {0, 1, 2}; //array with 3 elements OR int arr[3]; //array with 3 elements You can choose to give it values when you define it (example 1) or show how big it will be inside the square brackets (example 2). You can also do both, but at least one is required.
25th Jan 2018, 2:55 PM
Jacob Pembleton
Jacob Pembleton - avatar