惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
V
Vulnerabilities – Threatpost
T
Tenable Blog
Forbes - Security
Forbes - Security
Simon Willison's Weblog
Simon Willison's Weblog
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
Project Zero
Project Zero
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Visual Studio Blog
WordPress大学
WordPress大学
Latest news
Latest news
K
Kaspersky official blog
T
Tailwind CSS Blog
T
Threat Research - Cisco Blogs
B
Blog RSS Feed
C
Cisco Blogs
博客园 - 聂微东
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
小众软件
小众软件
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
罗磊的独立博客
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Privacy International News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
S
SegmentFault 最新的问题
Security Latest
Security Latest
Y
Y Combinator Blog
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
P
Privacy & Cybersecurity Law Blog
L
LINUX DO - 最新话题
月光博客
月光博客
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
S
Security Affairs
P
Proofpoint News Feed
D
DataBreaches.Net
有赞技术团队
有赞技术团队
云风的 BLOG
云风的 BLOG

博客园 - Rawu

QT 使用(1) 到广外路线图 假期电话值班问题 test from blogex Event Sample -- from Professional C# DB2数据库中提高INSERT性能详解 [zt] Uwyn C++ Coding Standard 成员模板 class template template base -- Symbian OS C++ for Mobile Phones Volume2 -- hand note [zt]DB2编程小结 写个帖子记录一些小问题。 High-performance SQL Using DB2 routines to ease migration [ICNEWCASTLE]Bad day at the office [ICNEWCASTLE]I'll celebrate! the night before last night 's dream find it for a long time .. PB dddw filter Problem's Solution
const coding style
Rawu · 2006-06-05 · via 博客园 - Rawu

 1#include <iostream>
 2using namespace std ;
 3int main(void)
 4{
 5    int obj1 = 33;
 6    int obj2 = 66;    
 7    int *const cp_nci = &obj1;      // const pt point to nonconst int 
 8    *cp_nci = 56;                    // can modify
 9    //cp_nci = &obj2;                // cannot modify    
10    cout<<cp_nci<<" "<<*cp_nci<<endl;
11    
12    int const *ncp_ci ;              //non const pt point to const int 
13    ncp_ci = &obj1;                    // needn't be initialized
14    //*ncp_ci = 12;                    // cannot modify
15    ncp_ci = &obj2;                    // can modify
16    cout<<ncp_ci<<" "<<*ncp_ci<<endl;
17    
18    int const *const cp_ci  = &obj1 ; //const pt point to const int 
19    //*cp_ci = 90;                      // cannot modify
20    //cp_ci = &obj2 ;                  // cannot modify
21    cout<<cp_ci<<" "<<*cp_ci<<endl;
22    
23}

24