Đang chuẩn bị liên kết để tải về tài liệu:
Absolute C++ (4th Edition) part 24

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

Absolute C++ (4th Edition) part 24. KEY BENEFIT: C++ programming concepts and techniques are presented in a straightforward style using understandable language and code. KEY TOPICS: C++ Basics; Flow of Control; Function Basics; Parameters and Overloading; Arrays; Structures and Classes; Constructors; Operator Overloading, Friends, and References; Strings; Pointers and Dynamic Arrays; Separate Compilation and Namespaces; Streams and File I/O; Recursion; Inheritance; Polymorphism and Virtual Functions; Templates; Linked Data Structures; Exception Handling; Standard Template Library; Patterns and UML. MARKET: Useful for both beginning and intermediate C++ programmers. . | Structures 233 Display 6.2 A Structure with A Structure Member part 2 of 2 41 42 43 44 45 - account.maturity.year endl it had a balance of account.balanceAtMaturity endl return 0 46 uses iostream 47 void getCDData CDAccount theAccount 48 49 cout Enter account initial balance 50 cin theAccount.initialBalance 51 cout Enter account interest rate 52 cin theAccount.interestRate cout Enter the number of months until maturity 54 cin theAccount.term 55 cout Enter the maturity date n 56 getDate theAccount.maturity 57 58 uses iostream 59 void getDate Date theDate 60 61 cout Enter month 62 cin theDate.month 63 cout Enter day 64 cin theDate.day 65 cout Enter year 66 cin theDate.year 67 Sample Dialogue Enter account data on the day account was opened Enter account initial balance 100.00 Enter account interest rate 10.0 Enter the number of months until maturity 6 Enter the maturity date Enter month 2 Enter day 14 Enter year 1899 When the CD matured on 2-14-1899 it had a balance of 105.00 234 Structures and Classes INITIALIZING STRUCTURES You can initialize a structure at the time that it is declared. To give a structure variable a value follow it by an equal sign and a list of the member values enclosed in braces. For example the following definition of a structure type for a date was given in the previous subsection struct Date int month int day int year Once the type Date is defined you can declare and initialize a structure variable called dueDate as follows Date dueDate 12 31 2003 The initializing values must be given in the order that corresponds to the order of member variables in the structure type definition. In this example dueDate.month receives the first initializing value of 12 dueDate.day receives the second value of 31 and due-Date.year receives the third value of 2003. It is an error if there are more initializer values than struct members. If there are fewer initializer values than struct members the provided values are used to initialize data members in order. .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.