- 博客(4)
- 问答 (1)
- 收藏
- 关注
原创 C++ 指针 new delete
///C++指针:/// *操作符两边的空格是可选的。传统的,C程序员使用这种格式:int *ptr;这强调/// *ptr是一个int型的值,而C++程序员一般用这种格式:int* ptr;这强调的是:int*/// 是一种类型,是指向int的指针/// int* p1,p2;将创建一个指针p1,和一个整型的p2。对于每个指针变量名,都需要使/// 用一个*/// 在C+
2016-09-26 20:23:54 433
原创 循环链表实现约瑟夫环
数据结构老师在课上提到的 故事背景很有意思 所以我就做了一下/*#includeusing namespace std;/// 第一个不对 暂时还没弄明白typedef struct node{ int data; node *next;/// struct}node;node *createlist(int n){ if(n<1){ co
2016-09-26 20:16:17 196
原创 1~n的整数中1的个数
太久没写博客了呀 这篇文章的精华代码只是在大神的基础上加了注释 勉强弄懂 感谢John_Cc大神/*#include using namespace std;int count_1(int num){ int i = 0; while(num){ if(num % 10 == 1){ i++; }
2016-09-23 19:52:36 260
原创 poj 2104 K-th number
DescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able
2016-09-11 12:35:58 273
空空如也
C++ 小白有一条语句不明白 求各位大佬帮个忙
2017-05-24
TA创建的收藏夹 TA关注的收藏夹
TA关注的人