1 / 8

포인터

포인터. Visual Studio 2010 Express 디버깅. (Ctrl + Alt + M) + 숫자 : 메모리 창 (Ctrl + Alt + W) + 숫자 : 조사식 F10 : Step Into F11 : Step Over F9 : Breakpoint 지정 Ctrl + F5 : 빌드 후 pause 를 이용한 실행. 포인터 변수. 포인터 변수 : 메모리의 주소값을 저장하기 위한 변수 데이터가 있는 메모리의 위치를 담는 변수 주소를 저장하는 변수 포인터에서의 자료형은 변수의 해석 방식

bluma
Download Presentation

포인터

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 포인터

  2. Visual Studio 2010 Express 디버깅 • (Ctrl + Alt + M) + 숫자 : 메모리 창 • (Ctrl + Alt + W) + 숫자 : 조사식 • F10 : Step Into • F11 : Step Over • F9 : Breakpoint 지정 • Ctrl + F5 : 빌드 후 pause를 이용한 실행

  3. 포인터 변수 포인터 변수 : 메모리의 주소값을 저장하기 위한 변수 데이터가 있는 메모리의 위치를 담는 변수 주소를 저장하는 변수 포인터에서의 자료형은 변수의 해석 방식 포인터 변수의 크기는\?

  4. 선언방법 • Int *pnData; • 포인터 변수에 임의로 주소를 저장하는 일은 하지 않는 게 좋다. • 초기화 시 ‘NULL’권장.

  5. &연산자 • 피연산자의 주소값을 반환. • Int num=5; • Int *pnum = # • &의 피연산자는 변수만 가능

  6. *연산자 • *연산자: 포인터에 저장되어 있는 메모리 주소 • &와의 관계를 생각해 보자.

  7. Offset • Int *a = 0일 때, a+2=?

  8. 연습. • 연습문제.

More Related