Форум » C/C++ для начинающих (C/C++ for beginners) » array » Ответить

array

suhas: how to use an array?

Ответов - 1

Сыроежка: It is a too general question. Could you elaborate what you want to know about arrays. The main difference between arrays and other scalar objects is that you can access elements of an array using the subscript operator. For example [pre2] #include <iostream> int main() { int a[] = { 1, 2, 3, 4, 5 }; std::cout << "Element with index 0 has value " << a[0] << std::endl; std::cout << "Element with index 4 has value " << a[4] << std::endl; } [/pre2]



полная версия страницы