[C++] C++에서의 배열 선언
JAVA에서의 배열 선언 나는 프로그래밍 언어를 JAVA로 시작하였기 때문에 JAVA가 편하다. 그래서 C++을 사용할 때 헷갈려서 불편하곤 한다. 특히 '배열'을 선언할 때 불편하다. 먼저 JAVA에서의 배열 선언이다. int [] Array =new int [3]; 만약 배열의 크기가 정해지지 않았다면 다음과 같이 설정하면 된다. Scanner scan=new Scanner (System.in); int n=scan.nextInt(); int [] Array = new int [n]; 2차원 배열도 위의 방법과 같이 생성 할 수 있다. Scanner scan=new Scanner(System.in); int m=scan.nextInt(); int n=scan.nextInt(); int [][] Arr..