当前位置:网站首页>Pre ++ and post ++ overloads
Pre ++ and post ++ overloads
2022-06-30 07:34:00 【RobotLife】
To distinguish between the prefix and postfix versions of the ++ operator, C++ adopted the convention of letting operator++() be the prefix version and operator++(int) be the suffix version;`
iterator& operator++() // for ++it
{
pt = pt->p_next;
return *this;
}
iterator operator++(int) // for it++
{
iterator tmp = *this;
pt = pt->p_next;
return tmp;
}`
Reference material :
《C++ Primer》
边栏推荐
- RT thread kernel application development message queue experiment
- Video player (II): video decoding
- Mailbox application routine of running wild fire RT thread
- Xiashuo think tank: 125 planet updates reported today (packed with 101 meta universe collections)
- 2021 private equity fund market report (62 pages)
- LabVIEW程序代码更新缓慢
- Network security - single arm routing, DHCP relay and ICMP Protocol
- Next initializesecuritycontext failed: unknown error (0x80092012) - the revocation function cannot check whether the certificate is revoked.
- MAX6675 usage notes
- Sublime text 3 configuring the C language running environment
猜你喜欢

String application -- string violent matching (implemented in C language)

Test enumeration types with STM32 platform running RT thread

QT elementary notes

Use of ecostruxure (2) IEC61499 to establish function blocks

Basic knowledge of compiling learning records

C language implementation of chain stack (without leading node)

SwiftUI打造一款美美哒自定义按压反馈按钮

Network security ARP protocol and defense

Implementation of double linked list in C language

The most convenient serial port screen chip scheme designed at the charging pile in China
随机推荐
Final review -php learning notes 9-php session control
Variable storage unit and pointer
期末複習-PHP學習筆記6-字符串處理
線程池——C語言
How to batch modify packaging for DXP schematic diagram
4diac getting started example
DS1302 digital tube clock
LabVIEW program code update is slow
Xiashuo think tank: 28 updates of the planet reported today (including the information of flirting with girls and Han Tuo on Valentine's day)
Label the picture below the uniapp picture
The most convenient serial port screen chip scheme designed at the charging pile in China
Account command and account authority
视频播放器(二):视频解码
Network security - single arm routing, DHCP relay and ICMP Protocol
Test enumeration types with STM32 platform running RT thread
系统软件开发基础知识
Installation software operation manual (continuous update)
Final review -php learning notes 7-php and web page interaction
Network security - detailed explanation of VLAN and tunk methods
Application of stack -- using stack to realize bracket matching (C language implementation)