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

推荐订阅源

Google DeepMind News
Google DeepMind News
SecWiki News
SecWiki News
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
F
Fortinet All Blogs
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
O
OpenAI News
T
Troy Hunt's Blog
TaoSecurity Blog
TaoSecurity Blog
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LINUX DO - 最新话题
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
Engineering at Meta
Engineering at Meta
美团技术团队
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
V
Vulnerabilities – Threatpost
B
Blog RSS Feed
NISL@THU
NISL@THU
Security Latest
Security Latest
The Register - Security
The Register - Security
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
N
News and Events Feed by Topic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Schneier on Security
罗磊的独立博客
Know Your Adversary
Know Your Adversary
Hacker News: Ask HN
Hacker News: Ask HN
S
Security Affairs
月光博客
月光博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - JieNet

MFC中的数据类型 HardwareSerialNumber(硬盘号,CPU号) - JieNet - 博客园 Windows 7 与 XP、Vista 特性对照表 typename 还是超级无敌的基础。。。 可变参数的基本应用 关于const和函数 - JieNet - 博客园 iterator类对象和普通指针 委托与事件 .NET中的加密解密:私钥加密(对称加密):AES、DES、RC2、Rijindael、TripleDES 事件 ID: 5603 将DAL层从Sql Server 迁移到 Access 时遇到的问题 ListView:How to.... CSS剪切图片 SQL Server TransAction 全部回滚 所有希腊字母及读音 Error:'Sys' is undefined. VS2008 下安装 AjaxControlToolkit-Framework3.5 JS,CSS 禁止复制,禁止打印,禁止…… ADSL拨号错误代码详解
函数指针。。。超级无敌的基础了
JieNet · 2009-06-02 · via 博客园 - JieNet

#include<iostream>using std::cout;
using std::endl;int Sum(int a,int b)
{
    
return a+b;
}
void Show(int (*ptr_sum)(int,int))
{
    cout
<<"Show:"<<ptr_sum(1,2)<<endl;
}
int main()
{
    
//函数指针
    int (*ptr_sum)(int,int);
    ptr_sum 
= Sum;    
    
    cout
<<"Sum:"<<ptr_sum(1,2)<<endl;
    Show(ptr_sum);
//函数指针做实参

    system(
"pause");
    
return 0;
}