源代码
Prometheus2060
时间会为你的努力给出答案...
展开
-
和式分解
实验4 = 44 = 3 + 14 = 2 ===================================#include #include #define MAXN 100int a[MAXN];int r[MAXN];void rd(int n, int k) //递归法{ int j = 0; int i = 0; fo原创 2014-08-25 14:26:48 · 1139 阅读 · 0 评论 -
树、内存、栈
#include #include #define MEMORY_SIZE 102400 typedef unsigned char BYte; typedef void* PTr; typedef PTr (*NOdefunc)(void); //函数指针NOdefunctypedef void (*DOfunc)(int n, PTr p); //转载 2014-08-25 14:10:00 · 671 阅读 · 0 评论 -
无内存限制存储字符串
#include #include #include #include using namespace std;int main(){ string str; string::iterator it; while (getline(cin, str)) { it = str.begin(); while (1) { if原创 2014-08-13 17:18:04 · 493 阅读 · 0 评论 -
简单的计数器程序
#include #include int add(int x, int y){ return (x+y);}int sub(int x, int y){ return (x-y);}int mul(int x, int y){ return (x*y);}int divi(int x, int y){ return (x/y原创 2014-08-25 14:25:33 · 1055 阅读 · 0 评论 -
memcpy的自定义实现的源代码
#include #include void *my_memcpy(void *dst, const void *src, int count){ char *ret = NULL; //备份dst的地址,用于返回 char *dst_t = NULL; //强制指针转换,指向dst或重新定位 char *src_t = N原创 2014-08-10 15:19:06 · 639 阅读 · 0 评论 -
高精度乘法运算的实现(不完全)
#include #include #include using namespace std;class Mul_string{public: void Set_value(const string &a, const string &b); void Get_point(); long long stoi(const string &a); str原创 2014-08-25 21:53:31 · 549 阅读 · 0 评论 -
类内/类外的回调函数---调用类的普通成员函数/类的静态成员函数/全局函数
// test.h#ifndef TEST#define TEST#include using namespace std;class Test{public: Test(); ~Test();public: // 可调用全局函数 void callBackFunc(int x, int原创 2015-04-04 00:12:28 · 1145 阅读 · 0 评论 -
Qt里通过传递函数指针实现动态绑定信号/槽
// test.h#include class QTimer;class Test:public QObject{Q_OBJECTpublic: Test(QObject * parent = 0); ~Test(); void startTimer(int interval); void co原创 2015-04-03 23:02:03 · 4832 阅读 · 1 评论