- 博客(8)
- 收藏
- 关注
转载 Visual Studio 2013 手动缩进
vs缩进多行,vs2013测试可用选中要缩进的行,然后点击tab会直接在选中行增大缩进快捷键功能描述tab增大缩进选中要缩进的行,可多行shift + table减小缩进选中要缩进的行,可多行转载:http://www.cn
2015-09-06 22:52:51
832
原创 函数传递const和非const非引用参数的笔记 - 20150905
//1.定义函数参数为非const,然后传递const给它,可不可以?//2.定义函数参数为const ,然后传递非const给它,可不可以?#include using namespace std;//函数里面不能再定义函数//非const形参的函数int unconst(int a, int b){return a + b;}
2015-09-05 23:01:43
596
原创 孤独的7 虫蚀算-穷举法
#include using namespace std;int main(){ int Result; int iSix; int iFive; int iFour; int iThree; int iTwo; for (int i = 1, iDivisor = 100; iDivisor != 1000; ++iDivisor) { for (int iDivi
2015-09-05 15:35:22
2839
转载 字符字符串和指针相关的内容的总结
初学C++总是容易在字符类型/字符串数组以及和数组的关系上犯糊涂,在这里进行一个总结(1)字符常量和变量 字符常量就是用单撇号括起来的一个字符,在内存中占一个字节。 ①'a' 'D'都是合法的,但是'AB'不合法,因为只能包括一个字符; ②字符常量是区分大小写的'a‘和'A'是不同的字符常量;
2012-11-19 10:20:45
492
原创 售货员习题对关于类的静态数据和成员函数的总结-20120917
最近,谭浩强的售货员卖东西的习题,看起来挺简单的,但是自己做起来却花了比较长的时间,在此做一个总结。先上习题:================================================================================ 9. 商店销售某一商品, 商店每天公布统一的折扣(discount)。 同时允许销售人员在售时灵活掌握售
2012-09-19 19:10:09
1206
2
原创 谭浩强C++ 程序设计7_1
首先画一个流程图#include using namespace std;//定义Date结构体struct{ int year; int input_month; int day;} Date;int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};main(){ void Input_time()
2012-06-09 22:19:25
1716
原创 谭浩强C++程序设计_指针习题13
【题目】用矩形法求积分sinx (0,1) cos(-1,1) exp(0,2)【程序】#include #include using namespace std;main(){ double integral(double (*p)(double),double up_limit,double low_limit); double (*p) (double);
2012-04-15 15:42:12
1515
原创 谭浩强C++程序设计_指针习题11
【1.题目】 11. 在主函数中输入10个等长的字符串。 用另一函数对它们排序。 然后在主函数出这 10 个已排好序的字符串。 12. 用指针数组处理上一题目, 字符串不等长。 【2.代码】#include #include #include using namespace std;main(){ void display(char * *p); void arr
2012-04-10 13:05:15
1729
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人