IAR C/C++ Compilers Reference Guide for the Renesas 78K0/78K0S and 78K0R Microcontroller Subfamilies

Total Page:16

File Type:pdf, Size:1020Kb

IAR C/C++ Compilers Reference Guide for the Renesas 78K0/78K0S and 78K0R Microcontroller Subfamilies IAR C/C++ Compilers Reference Guide for the Renesas 78K0/78K0S and 78K0R Microcontroller Subfamilies C78K-4 C78K-4:1 COPYRIGHT NOTICE Copyright © 2000–2010 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment on any part of IAR Systems. While the information contained herein is assumed to be accurate, IAR Systems assumes no responsibility for any errors or omissions. In no event shall IAR Systems, its employees, its contractors, or the authors of this document be liable for special, direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claim for lost profits, fees, or expenses of any nature or kind. TRADEMARKS IAR Systems, IAR Embedded Workbench, C-SPY, visualSTATE, From Idea To Target, IAR KickStart Kit, IAR PowerPac, IAR YellowSuite, IAR Advanced Development Kit, IAR, and the IAR Systems logotype are trademarks or registered trademarks owned by IAR Systems AB. J-Link is a trademark licensed to IAR Systems AB. Microsoft and Windows are registered trademarks of Microsoft Corporation. Renesas is a registered trademark of Renesas Electronics Corporation. Adobe and Acrobat Reader are registered trademarks of Adobe Systems Incorporated. All other product names are trademarks or registered trademarks of their respective owners. EDITION NOTICE Fourth edition: May 2010 Part number: C78K-4 This guide applies to version 4.7 of IAR Embedded Workbench® for Renesas Electronics’ 78K0/78K0S and 78K0R Microcontroller Subfamilies. Internal reference: R13, Too6.0, IMAE. C78K-4:1 Brief contents Tables ..................................................................................................................... xix Preface ................................................................................................................... xxi Part 1. Using the compilers ....................................................... 1 Getting started .................................................................................................... 3 Data storage ...................................................................................................... 11 Functions ............................................................................................................... 21 Placing code and data .................................................................................... 39 The DLIB runtime environment .............................................................. 53 The CLIB runtime environment .............................................................. 83 Assembler language interface ................................................................... 91 Using C++ .......................................................................................................... 109 Efficient coding for embedded applications ...................................... 123 Part 2. Reference information ........................................... 141 External interface details ............................................................................ 143 Compiler options ........................................................................................... 149 Data representation ...................................................................................... 181 Compiler extensions .................................................................................... 193 Extended keywords ....................................................................................... 203 Pragma directives ............................................................................................ 217 Intrinsic functions ........................................................................................... 233 The preprocessor ........................................................................................... 237 iii C78K-4 Library functions ............................................................................................. 243 Segment reference ......................................................................................... 253 Implementation-defined behavior .......................................................... 267 Index ..................................................................................................................... 281 IAR C/C++ Compilers iv Reference Guide for 78K C78K-4 Contents Tables ..................................................................................................................... xix Preface ................................................................................................................... xxi Who should read this guide ..............................................................xxi How to use this guide .........................................................................xxi What this guide contains .................................................................xxii Other documentation ........................................................................xxiii Further reading ................................................................................xxiv Document conventions .....................................................................xxiv Typographic conventions ................................................................. xxv Naming conventions ........................................................................ xxv Part 1. Using the compilers ....................................................... 1 Getting started .................................................................................................... 3 IAR language overview ........................................................................... 3 Supported 78K devices ........................................................................... 4 Building applications—an overview .................................................. 4 Compiling ............................................................................................. 5 Linking ................................................................................................ 5 Basic settings for project configuration .......................................... 6 Processor core ..................................................................................... 6 Code model .......................................................................................... 7 Data model (78K0R only) .................................................................... 7 Optimization for speed and size ........................................................... 7 Runtime environment ........................................................................... 8 Special support for embedded systems .......................................... 9 Extended keywords ............................................................................ 10 Pragma directives ............................................................................... 10 Predefined symbols ............................................................................ 10 Special function types ........................................................................ 10 Accessing low-level features ............................................................. 10 v C78K-4 Data storage ...................................................................................................... 11 Introduction ............................................................................................. 11 Different ways to store data ............................................................... 11 Data models (78K0R only) .................................................................. 12 Specifying a data model ..................................................................... 12 Memory types .......................................................................................... 13 Short address Area ............................................................................. 14 Near .................................................................................................... 14 Far (78K0R only) ............................................................................. 14 SFR ..................................................................................................... 14 Using data memory attributes ............................................................ 14 Pointers and memory types ................................................................ 16 Structures and memory types ............................................................ 16 More examples ................................................................................... 17 C++ and memory types ...................................................................... 17 Auto variables—on the stack ............................................................ 18 The stack ............................................................................................ 18 Dynamic memory on the heap ........................................................ 20 Functions ............................................................................................................... 21 Function-related extensions .............................................................. 21 Code models and memory
Recommended publications
  • 08-02-2021 Agenda Packet.Pdf
    AGENDA DELANO CITY COUNCIL REGULAR MEETING August 2, 2021 DELANO CITY HALL, 1015 – 11th Avenue 5:30 P.M. IN ACCORDANCE WITH THE GOVERNOR NEWSOM’S EXECUTIVE ORDER #N-08-21, THIS MEETING WILL BE CONDUCTED FULLY VIA TELECONFERENCE, DUE TO THE CURRENT RESTRICTIONS BY SAID ORDER AND CENTERS FOR DISEASES CONTROL AND PREVENTION (CDC) GUIDELINES. THE PUBLIC WILL HAVE ACCESS TO CALL IN, LISTEN TO THE MEETING AND PROVIDE PUBLIC COMMENT. IN ACCORDANCE WITH GOVERNOR NEWSOM’S EXECUTIVE ORDER N-08-21, THERE WILL NOT BE A PHYSICAL LOCATION FROM WHICH THE PUBLIC MAY ATTEND. IN ORDER TO CALL INTO TH E MEETING PLEASE SEE THE DIRECTIONS BELOW. CALL TO ORDER INVOCATION FLAG SALUTE ROLL CALL PRESENTATIONS AND AWARDS Featured Pet – Tabitha PUBLIC COMMENT: The public may address the Council on items which do not appear on the agenda. The Council cannot respond nor take action on items that do not appear on the agenda but may refer the item to staff for further study or for placement on a future agenda. Comments are limited to 3 minutes for each person and 15 minutes on each subject. Please state your name and address for the record. CONSENT AGENDA: The Consent Agenda consists of items that in staff’s opinion are routine and non-controversial. These items are approved in one motion unless a Councilmember or member of the public removes a particular item. 1) Authorization to waive the reading of any ordinance in its entirety and consenting to the reading of such ordinances by title only 2) Warrant Register in the amount of $3,044,398.54 3) Minutes of regular City Council Meeting of July 19, 2021 4) Acceptance and Approval of the City of Delano Quarterly Investment Report 5) Resolution adopting the 2020-2021 Kern Multi-Jurisdiction Hazard Mitigation Plan (MJHMP) 6) Approval of agreement with Youth Educational Sports, Inc.
    [Show full text]
  • Standard Template Library
    STANDARD TEMPLATE LIBRARY Developed By Mrs. K.M.Sanghavi STANDARD TEMPLATE LIBRARY (STL) Developed by Alexander Stepanov and Meng Lee of HP in 1979. Standard template library accepted in July 1994 into C++ ANSI Standard These are called as collection of General-purpose template classes( data structures) and functions 1 COMPONENTS OF STL Containers Algorithms Iterators 2 COMPONENTS OF STL Algorithms use iterators to interact with objects stored in containers Container Algorithm1 Algorithm 2 Object1 Object2 Iterator 1 Iterator 2 Object3 Iterator 3 Algorithm 3 3 CONTAINER Objects that hold Example : Array data (of same type) Implemented by Template Classes 4 ALGORITHM Example : These are procedures used to process the data Searching, Sorting, contained in containers. Merging, Copying, Initializing Implemented by template functions 5 ITERATOR It is an object that Used to move points to an through the element in a contents of container container They can be Connect Algorithms incremented and with Containers decremented 6 COMPONENTS OF STL Containers 7 CATEGORIES OF CONTAINERS Sequence Containers Derived Associative Containers Containers 8 CONTAINERS STL Defines 10 Containers 9 CATEGORIES OF CONTAINERS Sequence Associative Derived • vector • set • stack • deque • multiset • queue • list • map • Priority_queue • multimap 10 SEQUENCE CONTAINERS Stores elements in a linear sequence Each element is related to other elements by its position along the line They allow insertion of elements Example Element Element Element Last …….. 0 1 2 element 11 THREE TYPES OF SEQUENCE CONTAINERS vector deque list 12 Vector : Sequence Container Expandable and dynamic array Grows and shrinks in size Insertion / Deletion of elements at back Permits direct access to any element 13 Vector : Sequence Container Container Header File Iterator vector <vector> Random Access 14 vector Sequence Container Declarations ◦ vector <type> v; type: int, float, etc.
    [Show full text]
  • SEI CERT C++ Coding Standard (2016 Edition)
    SEI CERT C++ Coding Standard Rules for Developing Safe, Reliable, and Secure Systems in C++ 2016 Edition Aaron Ballman Copyright 2017 Carnegie Mellon University This material is based upon work funded and supported by the Department of Defense under Contract No. FA8721-05-C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center. Any opinions, findings and conclusions or recommendations expressed in this material are those of the au- thor(s) and do not necessarily reflect the views of the United States Department of Defense. References herein to any specific commercial product, process, or service by trade name, trade mark, manu- facturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation, or favoring by Carnegie Mellon University or its Software Engineering Institute. This report was prepared for the SEI Administrative Agent AFLCMC/PZM 20 Schilling Circle, Bldg 1305, 3rd floor Hanscom AFB, MA 01731-2125 NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN “AS-IS” BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. [Distribution Statement A] This material has been approved for public release and unlimited distribution. Please see Copyright notice for non-US Government use and distribution.
    [Show full text]
  • IAR Systems Brings Functional Safety Tools to RISC-V with Certification for IEC 61508 and ISO 26262
    Press release Date: October 20, 2020 IAR Systems brings functional safety tools to RISC-V with certification for IEC 61508 and ISO 26262 Stockholm, Sweden—October 20, 2020— IAR Systems®, the future-proof supplier of software tools and services for embedded development, further extends its strong tools offering for RISC-V by announcing a certified version of its development tools. The functional safety edition of IAR Embedded Workbench® for RISC-V will be certified by TÜV SÜD according to the requirements of IEC 61508, the international umbrella standard for functional safety, as well as ISO 26262, which is used for automotive safety-related systems. In addition, the certification covers the international standard IEC 62304, which specifies life cycle requirements for the development of medical software and software within medical devices, and the European railway standards EN 50128 and EN 50657. “We are seeing RISC-V becoming an important architecture not only in broad designs, but specifically in automotive applications,” said Stefan Skarin, CEO, IAR Systems. “By providing our development tools with certification according to ISO 26262, we enable the RISC-V community to further expand and more rapidly bring functional safety designs to the market. As a commercial tools vendor, we are able to provide global technical support as well as invest in keeping our products robust, maintained and qualified. Our certified tools will enable our customers to speed up the path to using RISC-V in safety-critical applications within automotive and other areas.” “We see a strong demand for RISC-V with safety among our customers, and the certification of IAR Embedded Workbench for RISC-V aligns perfectly with that demand,” said Frankwell Lin, President, Andes Technology.
    [Show full text]
  • IAR Systems Supports New Amazon Web Services Iot Microcontroller Operating System Amazon Freertos at Launch
    Press release Date: November 30, 2017 IAR Systems supports new Amazon Web Services IoT Microcontroller Operating System Amazon FreeRTOS at Launch Amazon FreeRTOS will be supported by the leading embedded development toolchain IAR Embedded Workbench Uppsala, Sweden—November 30, 2017—IAR Systems®, a leading supplier of software tools and services for embedded development, announces support for newly launched Internet of Things (IoT) Microcontroller Operating System, Amazon FreeRTOS. Together with Amazon Web Services (AWS), IAR Systems provides developers with easy access to high-performance, pre-integrated development tools for developing and debugging embedded and IoT-connected applications based on Amazon FreeRTOS. Amazon FreeRTOS provides tools that developers need to quickly and easily deploy a microcontroller- based connected device and develop an embedded or IoT application without having to worry about the complexity of scaling across millions of devices. Based on the FreeRTOS kernel, Amazon FreeRTOS includes software libraries which make it easy to securely connect devices locally to AWS Greengrass, directly to the cloud, and update them remotely. For new devices, developers can choose to build their embedded and IoT application on a variety of qualified microcontrollers from companies collaborating with AWS and IAR Systems, including Microchip, NXP, STMicroelectronics and Texas Instruments. Since 1983, IAR Systems’ solutions have ensured quality, reliability and efficiency in the development of over one million embedded applications. Now available for Amazon FreeRTOS users, development tools from IAR Systems deliver leading code optimizations and extensive debugging functionality. The technology is coupled with professional technical support offered globally. “AWS is pleased to be teamed with IAR Systems to provide developers with access to a high performance, pre-integrated set of development tools for developing and debugging connected applications,” says Richard Barry, Principal Engineer, Amazon Web Services, Inc.
    [Show full text]
  • 8-Bit All Flash 78K0 Microcontrollers 78K0S
    For further information, please contact: NEC Electronics Corporation 1753, Shimonumabe, Nakahara-ku, Kawasaki, Kanagawa 211-8668, Japan Tel: 044-435-5111 http://www.necel.com/ [America] [Europe] [Asia & Oceania] NEC Electronics America, Inc. NEC Electronics (Europe) GmbH NEC Electronics (China) Co., Ltd 8-bit All Flash 2880 Scott Blvd. Arcadiastrasse 10 7th Floor, Quantum Plaza, No. 27 ZhiChunLu Haidian Santa Clara, CA 95050-2554, U.S.A. 40472 Düsseldorf, Germany District, Beijing 100083, P.R.China Tel: 408-588-6000 Tel: 0211-65030 Tel: 010-8235-1155 800-366-9782 http://www.eu.necel.com/ http://www.cn.necel.com/ http://www.am.necel.com/ Hanover Office Shanghai Branch Podbielskistrasse 166 B Room 2509-2510, Bank of ChinaTower, 30177 Hannover 200Y incheng Road Central, Tel: 0 511 33 40 2-0 Pudong New Area, Shanghai, P.R.China P.C:200120 Tel:021-5888-5400 Munich Office http://www.cn.necel.com/ Werner-Eckert-Strasse 9 81829 München Shenzhen Branch Tel: 0 89 92 10 03-0 Unit 01, 39/F, Excellence Times Square Building, Stuttgart Office No. 4068 Yi Tian Road, Futian District, Shenzhen, Industriestrasse 3 P.R.China P.C:518048 70565 Stuttgart Tel:0755-8282-9800 Tel: 0 711 99 01 0-0 http://www.cn.necel.com/ United Kingdom Branch NEC Electronics Hong Kong Ltd. Cygnus House, Sunrise Parkway Unit 1601-1613, 16/F., Tower 2, Grand Century Place, Linford Wood, Milton Keynes 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong MK14 6NP, U.K. Tel: 2886-9318 Tel: 01908-691-133 http://www.hk.necel.com/ Succursale Française 9, rue Paul Dautier, B.P.
    [Show full text]
  • Rogue Wave Standard C++ Library User's Guide and Reference
    Rogue Wave Standard C++ Library User's Guide and Reference Rogue Wave Software Corvallis, Oregon USA Standard C++ Library User's Guide and Reference for Rogue Wave's implementation of the Standard C++ Library. Based on ANSI's Working Paper for Draft Proposed International Standard for Information Systems--Programming Language C++. April 28, 1995. User's Guide Authors: Timothy A. Budd, Randy Smithey Reference Authors: Wendi Minne, Tom Pearson, and Randy Smithey Product Team: Development: Anna Dahan, Donald Fowler, Marlene Hart, Angelika Langer, Philippe Le Mouel, Randy Smithey Quality Engineering: KevinDjang, Randall Robinson, Chun Zhang Manuals: Wendi Minne, Kristi Moore, Julie Prince,Randy Smithey Support: North Krimsley Significant contributions by: Rodney Mishima Copyright © 1995-96 Rogue Wave Software, Inc. All rights reserved. Printed in the United States of America. Part # RW81-01-2-032596 Printing Date: July 1996 Rogue Wave Software, Inc., 850 SW 35th Street, Corvallis, Oregon, 97333 USA Product Information: (541) 754-5010 (800) 487-3217 Technical Support: (541) 754-2311 FAX: (541) 757-6650 World Wide Web: http://www.roguewave.com Please have your product serial number available when calling for technical support. Table of Contents 1. Introduction .........................................................................1 1.1 What is the Standard C++ Library?............................................................. 2 1.2 Does the Standard C++ Library Differ From Other Libraries? ............... 2 1.3 What are the Effects of
    [Show full text]
  • The Wrapper API's Baseline Requirements
    LASER INTERFEROMETER GRAVITATIONAL WAVE OBSERVATORY - LIGO - CALIFORNIA INSTITUTE OF TECHNOLOGY MASSACHUSETTS INSTITUTE OF TECHNOLOGY Document Type LIGO-T990097-11 - E 08/29/2000 The wrapper API’s baseline requirements James Kent Blackburn, Masha Barnes Jolien Creighton Distribution of this document: LIGO LDAS Group This is an internal working document of the LIGO Project. California Institute of Technology Massachusetts Institute of Technology LIGO Project - MS 51-33 LIGO Project - MS 20B-145 Pasadena CA 91125 Cambridge, MA 01239 Phone (818) 395-2129 Phone (617) 253-4824 Fax (818) 304-9834 Fax (617) 253-7014 E-mail: [email protected] E-mail: [email protected] WWW: http://www.ligo.caltech.edu/ Table of Contents Index file \\SIRIUS\kent\documents\LDAS\wrapperAPI\wrapperAPIReqCover.fm - printed August 29, 2000 The wrapper API’s baseline requirements James Kent Blackburn California Institute of Technology LIGO Data Analysis Group August 29, 2000 I. Introduction A. General Description: 1. The wrapperAPI is responsible for executing the advanced analysis pro- cesses which are based on MPI and executing in the LDAS distributed com- puting parallel cluster of nodes using an interpreted command language. 2. The wrapperAPI will be written entirely in C and C++. No TCL/TK will be used in this LDAS API. 3. The wrapperAPI will be initiated using the mpirun command. This command will be started solely by the mpiAPI. The mpiAPI will determine the appro- priate values for the mpirun command, as well as the appropriate commands for the wrapperAPI and pass these as command line arguments to mpirun. The wrapperAPI will interpret its own command line arguments which are automatically passed to the wrapperAPI by the mpirun command.
    [Show full text]
  • IAR Embedded Workbench® for ARM
    IAR Embedded Workbench® for ARM IAR Embedded Workbench is a set of highly sophisticated • Binary compatibility with other EABI compliant tools and easy-to-use development tools for embedded applica- • Automatic checking of MISRA C rules (MISRA C:2004) tions. It integrates the IAR C/C++ Compiler™, assembler, • Language extensions for embedded applications with linker, librarian, text editor, project manager, and C-SPY® target-speciic support Debugger in an integrated development environment • Advanced inline assembler • Support for ARM, Thumb1 and Thumb-2 processor modes (IDE). With its built-in chip-specific code optimizer, IAR • Support for the VFP9-S loating-point co-processor Embedded Workbench generates very efficient and reliable • Support for 4 Gbyte applications in all processor modes code for ARM devices. In addition to this solid technology, • Support for 64-bit long long IAR Systems also provides professional worldwide technical • 32- and 64-bit loating-point types in standard IEEE format support. • Reentrant code • Position Independent Code and Data (PIC/PID) MODULAR AND EXTENSIBLE IDE • Multiple levels of optimizations on code size and execution • A seamlessly integrated environment for building and speed allowing different transformations enabled, such as debugging embedded applications function inlining, loop unrolling etc. • Powerful project management allowing multiple projects in one workspace STATE-OF-THE-ART C-SPY® DEBUGGER • Build integration with IAR visualSTATE • Complex code and data breakpoints • Hierarchical project
    [Show full text]
  • STL) Is a Collection of Containers and Algorithms Which Is Part of the Standard C++ Library
    Containers, algorithms and more... The standard library is the collection of functions and types that is supplied with every standard-compliant C++ compiler What should be in the standard library? And equally important: what should not be? 2 Introduction to Systems Programming The standard library should: Provide basic functionality which the user can have difficulty implementing himself: Memory management Input / output Implementation-dependent information Save and simplify work: Supply useful non-primitive facilities 3 Introduction to Systems Programming The standard library cannot contain problem- specific code For example – a Student class It should contain generic classes and functions which are usable in a variety of problems: Containers – such as list, set, etc. Algorithms – such as sorting, searching Popular classes – such as string 4 Introduction to Systems Programming What are the requirements from the standard library's containers and algorithms? Simple to use Interfaces should be uniform and convenient Complete Reasonable features should be included Efficient Library code might take a large part of the execution time Extensible The user should be able to add new containers and algorithms that work with the given ones 5 Introduction to Systems Programming The containers included in the standard library should be generic We have seen several ways to implement generic containers: Using void* and pointers to functions Using templates Using subtyping and polymorphism 6 Introduction to Systems Programming
    [Show full text]
  • Familias De Microcontroladores
    INTRODUCCION Un microcontrolador es un circuito integrado tiene en su interior todas las características de un computador, es decir, programa y circuitos periféricos para CPU, RAM, una memoria de entrada y salida. Muy regularmente los microcontroladores poseen además convertidores análogo - digital, temporizadores, contadores y un sistema para permitir la comunicación en serie y en paralelo. Se pueden crear muchas aplicaciones con los microcontroladores. Estas aplicaciones de los microcontroladores son ilimitadas, entre ellas podemos mencionar: sistemas de alarmas, iluminación, paneles publicitarios, etc. Controles automáticos para la Industria en general. Entre ellos control de motores DC/AC y motores de paso a paso, control de máquinas, control de temperatura, tiempo; adquisición de datos mediante sensores, etc. HISTORIA El primer microprocesador fue el Intel 4004 de 4 bits, lanzado en 1971, seguido por el Intel 8008 y otros más capaces. Sin embargo, ambos procesadores requieren circuitos adicionales para implementar un sistema de trabajo, elevando el costo del sistema total. Los ingenieros de Texas Instruments Gary Boone y Michael Cochran lograron crear el primer microcontrolador, TMS 1000, en 1971; fue comercializado en 1974. Combina memoria ROM, memoria RAM, microprocesador y reloj en un chip y estaba destinada a los sistemas embebidos.2 Debido en parte a la existencia del TMS 1000,3 Intel desarrolló un sistema de ordenador en un chip optimizado para aplicaciones de control, el Intel 8048, que comenzó a comercializarse en 1977.3 Combina memoria RAM y ROM en el mismo chip y puede encontrarse en más de mil millones de teclados de compatible IBM PC, y otras numerosas aplicaciones. El en ese momento presidente de Intel, Luke J.
    [Show full text]
  • STL – Standard Template Library
    STL – Standard Template Library September 22, 2016 CMPE 250 STL – Standard Template Library September 22, 2016 1 / 25 STL – Standard Template Library Collections of useful classes for common data structures Ability to store objects of any type (template) Containers form the basis for treatment of data structures Container – class that stores a collection of data STL consists of 10 container classes: CMPE 250 STL – Standard Template Library September 22, 2016 2 / 25 STL Containers Sequence Container Stores data by position in linear order: First element, second element , etc. All containers Use same names for common operations Have specific operations Associate Container Stores elements by key, such as name, ID number or part number Access an element by its key which may bear no relationship to the location of the element in the container Adapter Container Contains another container as its underlying storage structure CMPE 250 STL – Standard Template Library September 22, 2016 3 / 25 STL Containers Sequence Container Vector Deque List Adapter Containers Stack Queue Priority queue Associative Container Set, multiset Map, multimap CMPE 250 STL – Standard Template Library September 22, 2016 4 / 25 How to access Components - Iterator Iterator is an object that can access a collection of like objects one object at a time. An iterator can traverse the collection of objects. Each container class in STL has a corresponding iterator that functions appropriately for the container For example: an iterator in a vector class allows random access An iterator
    [Show full text]