Mastering BorlandC++ 4.5

Similar documents
Practical C++ Programming

Syllabus of C++ Software for Hands-on Learning: This course offers the following modules: Module 1: Getting Started with C++ Programming

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

KLiC C++ Programming. (KLiC Certificate in C++ Programming)

Welcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p.

Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

CHOICE BASED CREDIT SYSTEM (With effect from )

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Short Notes of CS201

CS201 - Introduction to Programming Glossary By

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

SYSTEMS PROGRAMMING. Srimanta Pal. Associate Professor Indian Statistical Institute Kolkata OXFORD UNIVERSITY PRESS


MaanavaN.Com CS1203 OBJECT ORIENTED PROGRAMMING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

DOT NET TRAINING PROGRAM

CERTIFICATE IN WEB PROGRAMMING

Practical C Programming. Steve Oualline

Preface to the Second Edition Preface to the First Edition Brief Contents Introduction to C++ p. 1 A Review of Structures p.

Python Scripting for Computational Science

S Y B Voc Software Development Syllabus

The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured

C# 2008 and.net Programming for Electronic Engineers - Elektor - ISBN

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Tentative Teaching Plan Department of Software Engineering Name of Teacher Dr. Naeem Ahmed Mahoto Course Name Computer Programming

C++ (Non for C Programmer) (BT307) 40 Hours

C# Programming: From Problem Analysis to Program Design. Fourth Edition

Absolute C++ Walter Savitch

Computer Organization and Assembly Language. Lab Session 01

Lesson Plan. Subject: OBJECT ORIENTED PROGRAMMING USING C++ :15 weeks (From January, 2018 to April,2018)

C++ Programming for Programmers using Microsoft Visual C Professional

An Object Oriented Programming with C

Introduction to Programming Using Java (98-388)

Jh fouk;d egkfo ky;] xkmjokjk RANI DURGAVATI VISHWAVIDYALAYA, JABALPUR BACHLOR OF COMPUTER APPLICATION BCA SYLLABUS THIRD SEMESTER

MyProgram m i ng Lab. get with the programming. Through the power of practice and immediate personalized

Programming for Problem Solving 105A L T P Credit Major Minor Total Time

esi-risc Development Suite Getting Started Guide

CHAPTER 1: INTRODUCING C# 3

Computer Science (330)

C++ Programming for Programmers

Introduction to C++/CLI 3. What C++/CLI can do for you 6 The rationale behind the new syntax Hello World in C++/CLI 13

SOME ASSEMBLY REQUIRED

10CS36: Object Oriented Programming with C++

Murach s Beginning Java with Eclipse

Sai Nath University. Assignment For MCA 2nd Sem.

Object Oriented Programming with c++ Question Bank


WITH C+ + William Ford University of the Pacific. William Topp University of the Pacific. Prentice Hall, Englewood Cliffs, New Jersey 07632

XII CS(EM) Minimum Question List N.KANNAN M.Sc., B.Ed COMPUTER SCIENCE IMPORTANT QUESTION (TWO MARKS) CHAPTER 1 TO 5 ( STAR OFFICE WRITER)

Chapter 2. Basics of Program Writing

Syllabus for Computer Applications

OUTCOMES BASED LEARNING MATRIX

Week Day Topic Sub Topic Type Hours Pre-Evaluation Experience Collection & Demographics Online 2 OOPS concepts 1

XII- COMPUTER SCIENCE VOL-II MODEL TEST I

Time : 3 hours. Full Marks : 75. Own words as far as practicable. The questions are of equal value. Answer any five questions.

Chapters and Appendix F are PDF documents posted online at the book s Companion Website (located at

Python Scripting for Computational Science

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM)

B.Sc. Computer Science (Ancillary)

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: OBJECT ORINTED PROGRAMMING (Code: )

Object-Oriented Programming and Data Structures

Chapters are PDF documents posted online at the book s Companion Website (located at

TABLE OF CONTENTS PREFACE CHAPTER1 INTRODUCING WINDOWS++ 1

Problem Solving with C++

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS

Bar/ana C++ Version 2.0

Subject to Change Drawing Application 1 Introducing Computers, the Internet and C#

Beijing Jiaotong University CS-23: C++ Programming Summer, 2019 Course Syllabus

Microsoft Visual C# Step by Step. John Sharp

Contents. Preface. Introduction. Introduction to C Programming

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: OBJECT ORIENTED PROGRAMMING (Code: )

Ch02. True/False Indicate whether the statement is true or false.

This page intentionally left blank

RAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY OBJECT ORIENTED PROGRAMMING QUESTION BANK UNIT I 2 MARKS

Beginning ASP.NET. 4.5 in C# Matthew MacDonald

Contents. Using Interpreters... 5 Using Compilers... 5 Program Development Life Cycle... 6

B.C.A 2017 OBJECT ORIENTED PROGRAMMING USING C++ BCA303T MODULE SPECIFICATION SHEET

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE1303. B.Tech. Year - II

B. V. Patel Institute of Business Management, Computer & Information Technology

C++ for System Developers with Design Pattern

SAURASHTRA UNIVERSITY

1 INTRODUCTION. Purpose. Audience. Figure 1-0. Table 1-0. Listing 1-0.

1 INTRODUCTION. Purpose. Audience. Figure 1-0. Table 1-0. Listing 1-0.


Quiz Start Time: 09:34 PM Time Left 82 sec(s)

The Waite Group's. New. Primer Plus. Second Edition. Mitchell Waite and Stephen Prata SAMS

C# Programming in the.net Framework

C++ Programming for Non-C Programmers. Supplement

POST GRADUATE DIPLOMA IN LIBRARY AUTOMATION AND NETWORKING (PGDLAN)

CS201 Latest Solved MCQs

Computer Programming C++ (wg) CCOs

Software Development & Education Center C Programming

AN OVERVIEW OF C++ 1

HIGHER SECONDARY COMPUTER SCIENCE

SRE VIDYASAAGAR HIGHER SECONDARY SCHOOL. TWO MARKS

2 ABOUT VISUALDSP++ In This Chapter. Figure 2-0. Table 2-0. Listing 2-0.

Tokens, Expressions and Control Structures

Transcription:

Mastering BorlandC++ 4.5 Second Edition Tom Swan jsams 201 West 103rd Street Indianapolis, Indiana 46290

Contents Part I Environments 1 1 Introducing Borland C++ 4.5 3 Requirements 4 Installing Borland C++ 7 Protected Mode and DPMI 7 Part and Chapter Summaries 8 Summary 12 2 Integrated Development Environment 15 The Borland C++ IDE 16 Hands-On Tutorials 17 Compiling This Book's Programs 37 Summary 40 3 Project Manager 41 The Project Window 42 Hands-On Tutorials 47 Summary 59 4 Command-Line Environment 61 The Command-Line Compilers 62 Using the Brief Programmer's Editor 66 Using Turbo Debugger for DOS 67 Summary 68 Part II Programming with ANCI C 69 5 Data: What a Program Knows 71 Anatomy of a C Program 72 Comments 78 Variables and Data Types 81 Symbolic Constants 106 Enumerated Types 110 Type Conversions 113 Summary 116 Exercises 116

6 Action: What a Program Does 119 Expressions 120 The //Statement 141 The ^Statement 145 The Conditional Expression 149 The switch Statement 149 The while Statement i5j The do-while Statement... 154 The for Statement 156 The break Statement 158 The continue Statement 160 The goto Statement 161 Halting a Program with exit 162 Summary 164 Exercises 165 7 Functions: Divide and Conquer 167 Top-Down Programming 167 Local Variables 182 Function Parameters and Arguments 193 Function Modifiers 206 Macros 208 Summary 212 Exercises 214 8 Data Structures 215 Arrays 215 Multidimensional Arrays 229 Structures 241 Unions 251 Bit-Field Structures 256 Arrays and Structures 260 Summary 262 Exercises 263

MASTERING BORLAND C++ 4.5, SECOND EDITION 9 Pointers 265 Introducing Pointers 266 Pointers and Dynamic Variables 275 Pointers and Data Structures 290 Pointers and Functions 303 Dynamic Data Structures 320 Advanced Pointer Techniques 333 Summary 337 Exercises..339 10 Strings 341 Nature of a String 341 Using String Functions 348 Searching Strings for Patterns 363 Related Memory Functions, 370 Summary 375 Exercises 375 11 Input and Output 377 Standard File I/O 378 Direct Console I/O 383 Reading and Writing Text Files 399 Reading and Writing Binary Files 413 Directories and Drives 429 Advanced File Techniques 434 Summary 440 Exercises 442 Part III Programming with ANSI C++ 443 12 Introducing C++ 445 Anatomy of a C++ Program 446 Comparing C and C++ 448 C++ Comments 449 Introducing I/O Streams 452 Constants 461 Inline Functions 462 References ^77 Summary...486 xii

CONTENTS Exercises 488 13 Progamming with Classes 491 Why Use Object-Oriented Programming? 492 Using Member Functions 500 Constructors and Destructors 521 Arrays of Class Objects 535 Summary 538 Exercises 540 14 Object-Oriented Programming 541 Single Inheritance 541 Virtual Functions 562 Multiple Inheritance 578 Summary 586 Exercises 588 15 Advanced Topics in C++ 589 Friends 590 Operator Overloading 596 Overloading and Memory Management 609 Copying Class Objects 613 Advanced I/O Streams 618 Templates 623 Odds and Ends 631 Exceptions 641 Runtime Type Information 669 The ANSI C++ string Class 672 Summary 676 Exercises 677 Part IV DOS and Windows Development 679 16 The Borland Graphics Interface 681 Introducing the Borland Graphics Interface 682 How to Compile and Run BGI Programs 683 Initializing BGI Drivers 688 Viewports and Coordinates 696 Plotting Points 702 Drawing Lines 703 xiii

MASTERING BORLAND C++ 4.5, SECOND EDITION Selecting Colors 707 Drawing Shapes 711 Circular Shapes 717 Bitmaps 724 BGI Text Fonts 726 Creating Stand-Alone Graphics Applications 731 Summary 734 17 Borland's Template Class Library 737 Introducing Template Container Classes 738 Developing Class Consciousness 747 Using Abstract Data Types... 757 Summary 777 18 Assembly Language Optimizations 779 C Function Anatomies 780 Writing Inline BASM Code 787 Writing External Turbo Assembler Modules 795 Writing External TASM Modules 798 Using Interrupts...801 Summary 808 19 DOS and Windows Developer's Toolbox 811 Command-Line Tools 811 Optimizations 816 Choosing a Memory Model 825 Overlays and VROOMM 835 A Few Good Classes 840 Summary 849 20 Introducing Windows Programming 851 The ObjectWindows Library 852 Developing Windows Applications with OWL 853 Device-Independent Graphics 863 Using Turbo Debugger for Windows 868 Using WinSight 869 Using WinSpector 871 Menus, Icons, and Other Resources 872 Windows and Graphics 877 DLLs and Custom Controls 880

CONTENTS New Features in Windows 3.1 892 Summary 904 21 Introducing OLE 2 907 Some OLE Terms 910 Creating a Simple OLE Program 912 What Are Server IDs and Why Have Them? 913 Building Your OLE 2 Program 914 Debugging Your OLE 2 Program 915 Compound Files 919 The Drag-and-Drop Interface 927 The In-Place Activation and Editing Interface 931 Summary 935 Exercises 935 22 Creating OLE 2 Applications 937 Building an OLE Server 938 Building an OLE Container 950 Summary 956 Exercises 956 Part V Function Encyclopedia 957 23 Functions and Examples 959 A Character Sets 1353 B Compiler (BCC) Options 1355 C Linker Options 1365 D Operator Precedence and Associativity 1369 E C and C++ Keywords 1371 Bibliography 1375 Index 1377 XV