自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 学C/C++艰苦害怕忘记了 每天都在打这个

#include <stdio.h> //载入C标准头文件printf("");scanf("");#include <stdlib.h> //载入头文件system("pause");system("cls");#include <string.h> //字符串操作malloc(p);//分配内存free(p);//释放内存n

2018-05-07 14:30:31 172

原创 其他编辑器可通过VS2017编译不通过解决如下

上面的编译失败的=============================下面的解决===================================把SDL检查 改成否!!!

2018-05-04 15:48:27 1192

原创 //C语言共用体

//C语言共用体#include <stdio.h>#include <stdlib.h>union xx { int a; int b;};int main() //共用体特性 如果赋予就会覆盖前面的数据{ union xx c; c.a = 5; printf("%d\n",c.a); system("pause"); return 0;...

2018-05-04 13:51:12 157

原创 //C语言枚举结构

//C语言枚举结构#include <stdio.h>#include <stdlib.h>enum xx{ a, // 0 b // 1 c // 2};int main(){ int d = 1; if(a != d) //a = 0 != 1 { printf("YES\n"); } system("pause"); re...

2018-05-04 13:35:17 138

原创 c语言 数据结构 链表实例

//c语言 数据结构 链表实例#include <stdio.h>#include <stdlib.h>/*定义一个链表空间*/struct l{ int data; char a[20]; struct l *y; //定义数据域};int main(){ struct l a = { 1,"第一",NULL }; //定义一块表空间 stru...

2018-05-04 13:28:03 255

原创 C++引用&函数传递数组例子

#include <iostream>using namespace std;/*排序*/void xll(int (&ac)[5]);//排序函数int main(){    int a[5] = {1,8,5,6,3};    xll(a);    return 0;}void xll(int (&ac)[5]){    int c;    for(int i = ...

2018-04-30 09:56:44 11454

原创 C++引用&强大例子

#include <iostream>using namespace std;void xx(int &a ,int &c);//引用传参int main(){ int i = 1; int k = 2; xx(i,k); cout << i <<"\t" << k << e

2018-04-29 22:22:33 279

原创 C++命名空间例子简单易懂

#include <iostream>using namespace std;/* C++特性 命名空间*/namespace xx{ int i=10;};namespace Xx { // 命名空间 int i=16;}int main(){ //using namespace nsp; cout << xx::...

2018-04-29 21:56:16 417

原创 C++vector迭代器用法

#include <iostream>#include <vector>#include <algorithm>using namespace std;int main(){ vector<double> vecDouble = {11.1, 12.2, 13.3 ,14.4}; vector<double>:...

2018-04-29 20:27:56 2395

原创 有一种算法,叫做归纳,符合斐波那契数列规律。古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月,后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?

 有一种算法,叫做归纳, 先推算前几步,然后自己分析一个规律,再验证这个规律。这个兔子图,只是演示了兔子的继承关系,关键是最右侧的兔子总数,这个总数符合斐波那契数列规律。/*古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月   后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少?*/#include <stdio.h>int main(...

2018-04-19 00:06:50 1252

原创 c语言指针看了就会了超级简单

/*  经典指针可死记都学得会指针*/#include <stdio.h>#define L 10int main(){ int a[L]= {1,2,3,4,5,6,7,8,9,10};  //定义数组    int * ptr_a = a; //指针的优点可以直接把值赋予给指针      printf("%d\t%d\n",ptr_a + 9, * (ptr_a + 9)); /...

2018-04-18 23:59:28 139

原创 C语言求奇数_判断101~200之间的素数 输出所以素数和多少个

#include <stdio.h>#include <stdlib.h>/*判断101~200之间的素数 输出所以素数和多少个*///分析1.系数%2 == 1int main(){ int a;//定义个数 int i; for(i = 101;i <= 200;i++) { if(i%2...

2018-04-18 22:40:26 556

原创 C语言双for打印乘法口决

#include <stdio.h>#include <stdlib.h>int main(){ int i,a;//定义 for(i = 0;i <= 9;i++) { for(a = 0;a <= 9; a++) { printf("%d * %d = %d...

2018-04-18 22:25:14 167

原创 c/c++之路

c/c++之路开始一个没文凭,初中没毕业没文化的人,更不懂英文,学起来非常的吃力!从c入门到c++高级构架师 //从入门到放弃今天留下一句等到成功时回来感叹感叹!坚持坚持!...

2018-04-18 19:05:32 103

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除