C++ 배열

Jmnote (토론 | 기여)님의 2023년 9월 24일 (일) 13:46 판 (→‎같이 보기)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

C++ array
C++ 배열
#include <iostream>
using namespace std;
int main() {
    int nums[] = {3,4,2,1};
    int len = sizeof(nums)/sizeof(int);
    for(int i=0; i<len; i++) cout << nums[i] << " "; // 3 4 2 1 
}

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}