会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xinmind
博客园
首页
新随笔
联系
订阅
管理
2024年4月13日
IDEA控制台显示中文乱码
摘要: 当你在全网搜索解决方案还是没有解决中文乱码问题时下面的解决方案可以尝试一下 1.进入设置选项:文件-->设置 2.构建、执行、部署-->编译器-->Java编译器 3.在附加命令行形参中输入:-encoding utf-8 附录:我的环境中其他的配置如下 (1)编辑器-->文件编码:全局编码:UTF
阅读全文
posted @ 2024-04-13 16:11 Triphan
阅读(574)
评论(0)
推荐(0)
2023年3月10日
C++根据STL容器迭代器获取容器元素类型
摘要: 当我仿照STL的排序函数sort写一个自己的归并排序的函数时,而传入的参数是STL容器迭代器(指针),由于使用函数模板,则迭代器类型可变,那么如何根据STL容器迭代器获取该容器存储元素类型? 假设数组A和数组B分别定义为 const int N = 10; vector<int> A(N); vec
阅读全文
posted @ 2023-03-10 15:51 Triphan
阅读(123)
评论(0)
推荐(0)
2023年2月16日
C++PrimerPlus中文第六版第13章编程练习答案
摘要: 1、 // cd.h #ifndef CD_H_ #define CD_H_ class CD { private: char performers[50]; char label[20]; int selections; double playtime; public: CD(const char
阅读全文
posted @ 2023-02-16 15:58 Triphan
阅读(78)
评论(0)
推荐(0)
2023年2月15日
C++PrimerPlus中文第六版第12章编程练习答案
摘要: 1、 // cow.h #ifndef COW_H_ #define COW_H_ #include<iostream> class Cow { private: char name[20]; char* hobby; double weight; public: Cow(); Cow(const
阅读全文
posted @ 2023-02-15 14:52 Triphan
阅读(72)
评论(0)
推荐(0)
2023年2月14日
C++PrimerPlus中文第六版第11章编程练习答案
摘要: 1、 // vector.h #ifndef VECTOR_H_ #define VECTOR_H_ #include<iostream> namespace VECTOR { class Vector { public: enum Mode {RECT, POL}; private: double
阅读全文
posted @ 2023-02-14 12:47 Triphan
阅读(51)
评论(0)
推荐(0)
2023年2月11日
C++PrimerPlus中文第六版第10章编程练习答案
摘要: 1、 //bankaccount.h #ifndef BANKACCOUNT_H_ #define BANKACCOUNT_H_ #include<string> class BankAccount { private: std::string m_account_name; const char*
阅读全文
posted @ 2023-02-11 10:22 Triphan
阅读(79)
评论(0)
推荐(0)
2023年1月18日
C++编译报错:重定义默认参数:参数1
摘要: 报错原因:当函数声明和函数定义分离时,参数的默认值只能出现在函数声明中,在函数定义的函数头中无需添加默认值。
阅读全文
posted @ 2023-01-18 17:58 Triphan
阅读(732)
评论(0)
推荐(0)
2022年11月26日
C++PrimerPlus中文第六版第9章编程练习答案
摘要: 1、 // golf.hconst int Len = 40; struct golf { char fullname[Len]; int handicap; }; // non-ineractive version: // function sets golf structure to provi
阅读全文
posted @ 2022-11-26 11:41 Triphan
阅读(63)
评论(0)
推荐(0)
2022年11月21日
C++PrimerPlus中文第六版第8章编程练习答案
摘要: 1、 #include<iostream> #include<string> using namespace std; void show(const char* str, int n = 0); const int Size = 50; int main() { char s[Size] = "t
阅读全文
posted @ 2022-11-21 00:44 Triphan
阅读(67)
评论(0)
推荐(0)
2022年11月17日
C++PrimerPlus中文第六版第7章编程练习答案
摘要: 1、 #include<iostream> using namespace std; double computeHarmonicMean(double x, double y); int main() { double x, y; cout << "Enter two numbers(x!=0 a
阅读全文
posted @ 2022-11-17 19:10 Triphan
阅读(80)
评论(0)
推荐(0)
下一页
公告