Accueil / Programmation / Programming Languages / C++ / Working with array in the programming language C++

Working with array in the programming language C++

Print Friendly, PDF & Email

Trong C++, bạn có thể khai báo mảng một chiều như sau:

int amount[];
int* amount;

Đối với hai trường hợp này cần khởi tạo, chúng ta có thể làm như sau:

int n = G->numberofVertices(); // Lấy số đỉnh của đồ thị G
amount = new int[n];

À propos Nguyen Vu Ngoc Tung

I love making new professional acquaintances. Don't hesitate to contact me via nguyenvungoctung@gmail.com if you want to talk about information technology, education, and research on complex networks analysis (i.e., metabolic networks analysis), data analysis, and applications of graph theory. Specialties: researching and proposing innovative business approaches to organizations, evaluating and consulting about usability engineering, training and employee development, web technologies, software architecture.

Laisser une réponse

Votre adresse email ne sera pas publiéeLes champs requis sont surlignés *

*

*

code

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.