技术栈

C++ Primer plus--0a5 自定义带返回值的函数

zhyjhacker2024-05-11 19:51
cpp 复制代码
#pragma region convert.cpp
//convert.cpp -- converts stone to pounds
#if 0
#include <iostream>
 
int stonetolb(int);	//function prototype 
int main(void)
{
	using namespace std;

	int stone;
	cout << "Enter the weight in stone: ";
	cin >> stone;

	int pounds = stonetolb(stone);
	cout << stone << " stone = ";
	cout << pounds << " pounds," << endl;
	return 0;
}

int stonetolb(int sts)
{

	return 14 * sts;
}
#endif
#pragma endregion
上一篇:企业计算机服务器中了faust勒索病毒如何处理,faust勒索病毒解密恢复
下一篇:实战Java虚拟机-基础篇
相关推荐
saltymilk
21 小时前
C++ 模板参数推导问题小记(模板类的模板构造函数)
c++·模板元编程
感哥
21 小时前
C++ lambda 匿名函数
c++
沐怡旸
1 天前
【底层机制】std::unique_ptr 解决的痛点?是什么?如何实现?怎么正确使用?
c++·面试
感哥
1 天前
C++ 内存管理
c++
博笙困了
1 天前
AcWing学习——双指针算法
c++·算法
感哥
1 天前
C++ 指针和引用
c++
感哥
2 天前
C++ 多态
c++
沐怡旸
2 天前
【底层机制】std::string 解决的痛点?是什么?怎么实现的?怎么正确用?
c++·面试
River416
2 天前
Javer 学 c++(十三):引用篇
c++·后端
感哥
2 天前
C++ std::set
c++
热门推荐
01UV 工具安装与国内镜像源配置指南02GitHub 镜像站点0346个Nano-banana 精选提示词,持续更新中04Claude Code 平替:OpenAI发布 Codex CLI ,GPT-5 国内直接使用05UV安装并设置国内源06保姆级教程:手把手教你用Dify实现完美多轮对话(附Chatflow和提示词)07Spec-Kit 使用指南08A股预测还能更准?开源大模型Kronos带你跑通预测+回测全流程09解决 WSL Ubuntu 中 /etc/resolv.conf 自动重置问题10KGG转MP3工具|非KGM文件|解密音频