Data Structures and Algorithms – C++ Implementation
Số trang: 53
Loại file: pdf
Dung lượng: 167.88 KB
Lượt xem: 9
Lượt tải: 0
Xem trước 6 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
BKTP.HCMHo Chi Minh City University of Technology Faculty of Computer Science and EngineeringBKTP.HCMData Structures and Algorithms – C++ ImplementationHuỳnh T n tEmail: htdat@cse.hcmut.edu.vn Home Page: http://www.cse.hcmut.edu.vn/~htdat/.Pointer in C++Declaration Node *ptr; Create an object ptr = new Node(); A pointer usage printf(“Data in node: %d”, ptr-data); Destroy an object delete ptr; NULL pointer ptr = NULL;??? ptrptr??? ptrptrFaculty of Computer Science and Engineering – HCMUT Slide 2.Pointer in C++Be careful in these cases: Beforeptr1Beforeptr1ptr2 ptr1 = ptr2;ptr2 delete ptr1; ptr1 = NULL;GarbageAfterptr1Afterptr1ptr2ptr2Dangling reference problem Slide 3Faculty of Computer Science and Engineering – HCMUT.Parameter Passing Techniquesvoid func(int* a, int* b){ int *t;...
Nội dung trích xuất từ tài liệu:
Data Structures and Algorithms – C++ Implementation
Nội dung trích xuất từ tài liệu:
Data Structures and Algorithms – C++ Implementation
Tìm kiếm theo từ khóa liên quan:
Computer Science Engineering Computer Data Structures Algorithms C++ Implementation Pointer in CGợi ý tài liệu liên quan:
-
11 trang 130 0 0
-
Ebook Facts on file science experiments: Computer science experiments – Part 1
92 trang 68 0 0 -
Lecture Computer Architecture: Introduction
9 trang 38 0 0 -
Lecture Computer literacy - Lecture 03: Computer software
35 trang 32 0 0 -
Lecture Computer literacy - Lecture 27: Online Collaboration Applications
40 trang 32 0 0 -
computer science - an overview (12th edition): part 1
331 trang 30 0 0 -
Lecture Introduction to computing - Lecture 29
77 trang 30 0 0 -
Ebook Eloquent JavaScript - A modern introduction to programming: Part 1
199 trang 30 0 0 -
Lecture Introduction to computing - Lecture 21
40 trang 29 0 0 -
Lecture Introduction to computing - Lecture 13
50 trang 28 0 0