作品展示

1、WIFI语音广播 2、室内实时定位引擎(RTLS) a)定位算法测试软件 b)最终引擎 3、卫星信号实时监测
默认分类 | 2014-09-21 15:53 | 阅读 1514 次 | 评论 0 条

类24点

123456789在这些数之间可以差如+,-,最后等于某个值的组合数 方法一:递归法 void f2(int index,int opt,int sum,int value,int &amp;count) { for(int i=index;i<=9;i++){ int t=0; for(int m=index;m<=i;m++) t=10*t+m; if(i==9){ sum=sum+opt*t; if(value==sum) count++; return ; } f2(i+1,1,...
数据结构 | 2014-07-07 19:08 | 阅读 1232 次 | 评论 0 条

my heart will go on

every night in my dreams i see you, i feel you, that is how i know you go on far across the distance and spaces between us you have come to show you go on near, far, wherever you are i believe that the heart does go on once more you open the door and you're here in my heart and my heart...
歌词 | 2014-07-07 18:56 | 阅读 873 次 | 评论 0 条

类的sizeof

1、空类的sizeof是1。空类是指没有成员的类,类中的函数不占空间,除非是虚函数。 如: class A { public: A(){} ~A(){} void fun(){} }; sizeof(A)是1. 注: class A1 { public: A1(){} ~A1(){} void fun(){} char a[0]; }; sizeof(A1)也是1.(VC6.0下编译) 2、若类中包含成员,则类对象的大小只包括其中非...
C++ | 2014-06-08 17:39 | 阅读 943 次 | 评论 0 条

Windows7 IIS 7.0 局域网无法访问的解决

IIS7.0同局域网的计算机通过输入我的IP地址无法访问我的页面,但是在本机访问却没有问题,以前用IIS6.0的时候是可以的 解决方案有两种。 一种是关闭防火墙 另一种开放特定端口: 开始---所有程序---管理工具---高级安全 Windows 防火墙 在高级安全 Windows 防火墙的左边栏,选择“入站规则 在右边栏选择"新建规则“。 在弹出的窗口依次选择:选中端口---下一步---选中TCP...
网站 | 2014-06-07 11:11 | 阅读 821 次 | 评论 0 条

3000位二进制数转换为十进制数

#include<iostream> #include<fstream> #include<sstream> using namespace std; #define N 1000 void stradd(char *a,char *b) { int adder=0,new_adder,sum; for(int i=0;i<N;i++){ sum=a[i]+b[i]-'0'-'0'; new_adder=(sum+adder)/10; a[i]=(sum+adder)%10+'0'; adder=new_adder; } } ...
C++ | 2014-06-05 15:10 | 阅读 1769 次 | 评论 0 条

程序去注释

#include<stdio.h> int main() { FILE *fp_read,*fp_write; fp_read=fopen("in.cpp","r"); fp_write=fopen("out.cpp","w"); bool yinhao=false; char c; while(!feof(fp_read)){ c=fgetc(fp_read); if(c=='"') yinhao=!yinhao; if('/'==c){ if(yinhao){ fputc(c,fp_write); } ...
C语言 | 2014-06-05 14:18 | 阅读 832 次 | 评论 0 条

what's the time of next second

#include<stdio.h> #include<Windows.h> int main() { unsigned int year,month,day,hour,minute,second; unsigned int dom[]={31,28,31,30,31,30,31,31,30,31,30,31}; scanf("%u %u %u %u %u %u",&amp;year,&amp;month,&amp;day,&amp;hour,&amp;minute,&amp;second); if(year%400==0||(year%4==0&amp;&amp;y...
C语言 | 2014-06-04 21:51 | 阅读 806 次 | 评论 0 条

如何在C中调用matlab函数

一、Matlab中生成共享库 1、打开matlab编译器命令行 mcc -setup (选择对应的visual stdio版本) 2、在matlab中新建Deployment Project,然后添加文件,生成.h、.lib、.dll 二、在C项目中调用相应的函数 1、工程中,项目->属性->配置属性->VC++目录中包含目录和库目录分别改成matlab安装目录下 extern\include和extern\lib\win32\microsoft. ...
默认分类 | 2014-05-16 15:12 | 阅读 2420 次 | 评论 0 条

“error LNK1123” 错误

终极解决方案: VS2010在经历一些更新后,建立Win32 Console Project时会出“error LNK1123” 错误,解决方案为将 项目|项目属性|配置属性|清单工具|输入和输出|嵌入清单 “是”改为“否”即可,但是没新建一个项目都要这样设置一次。 在建立VS2010 Win32 Project项目时,按照上面解决方案依然发生了“error LNK1123”错误,经过上网查资料,解决方案为: 第一步:与上相同。 第二步:将 项目|项目属性|配置属性|连接器|清单文件|嵌入清单 “是”改为“否”。 第三步:一般计算机经过上两步设置就能解决问题了,但是如果还有问题...
默认分类 | 2014-05-13 18:04 | 阅读 845 次 | 评论 0 条

预处理命令

现在使用的许多C编译系统都包括了预处理、编译和连接等部分。 C提供的预处理功能主要有3种: 1、宏定义 2、文件包含 3、条件编译
C语言 | 2014-04-11 11:05 | 阅读 853 次 | 评论 0 条

变量的储存类别

一、静态储存方式与动态储存方式 1、静态储存 a)全局变量全部存储在静态储存区中,在程序开始运行时给全局变量分配存储区,程序执行完毕就释放。 2、动态储存 a)函数形式参数 b)自动变量(未加static声明的局部变量) c)函数调用时的现场保护和返回地址等 二、四种储存方法 1、auto变量 函数中的局部变量,如不专门声明为static储存类型,都是动态地分配储存空间的,...
C语言 | 2014-04-09 20:55 | 阅读 1705 次 | 评论 0 条

UpdateData用法

UpdateData() 是MFC的窗口函数,用来刷新数据的。 UpdateData(TRUE) ——刷新控件的值到对应的变量。(外部输入值交给内部变量) 即:控件的值—>变量。 UpdateData(FALSE) —— 拷贝变量值到控件显示。(变量的最终运算结果值交给外部输出显示) 即:变量值—>控件显示。 实例说明: 例如我们在对话框窗口中添加了3个editbox,然后将前两个的值相加,然...
MFC | 2014-03-20 15:23 | 阅读 1896 次 | 评论 0 条

动态链接库学习笔记

动态链接库有3种:NON-MFC DLL,REGRULAR DLL ,EXTENSION DLL DLL入口:DllMain函数 Windows在加载DLL的时候,需要一个入口函数,就如同控制台或DOS程序需要main函数、WIN32程序需要WinMain函数一样。在前面的例子中,DLL并没有提供DllMain函数,应用工程也能成功引用DLL,这是因为Windows在找不到DllMain的时候,系统会从其它运行库中引入一个不做任何操作的缺省DllMain函数版本,并不意味着DLL可以放弃DllMain函数。 根据编...
C++ | 2014-03-19 17:44 | 阅读 1709 次 | 评论 0 条

Namespace用法

#include<iostream> #include<Windows.h> using namespace std; namespace m1 { void greet(); } namespace m2 { void greet(); } void greet(); int main() { m1::greet(); m2::greet(); greet(); system("pause"); } namespace m1 { void greet() { cout<<"m1"<...
C++ | 2014-03-19 17:43 | 阅读 878 次 | 评论 0 条

Attack on Titans

Time Limit: 2 Seconds Memory Limit: 65536 KB Over centuries ago, mankind faced a new enemy, the Titans. The difference of power between mankind and their newfound enemy was overwhelming. Soon, mankind was driven to the brink of extinction. Luckily, the surviving humans managed ...
默认分类 | 2014-02-26 16:34 | 阅读 1991 次 | 评论 0 条

二叉树先序遍历(递归)

#include<stdio.h> #include<stdlib.h> typedef struct binarytree { int data; struct binarytree *lchild; struct binarytree *parent; struct binarytree *rchild; }BT; BT * init_bt() { BT *tree=(BT *)malloc(sizeof(BT)); tree->parent=NULL; tree->lchild=NULL; tree->rchild=NULL;...
数据结构 | 2013-12-26 22:16 | 阅读 1133 次 | 评论 0 条

进出栈

问题描述:火车分n小节,从头开始进站出站,有可能的顺序 #include<fstream> #include<sstream> #include<iostream> #include<stack> using namespace std; int main(){ ifstream in("rail.txt"); for(int n,line=0;in>>n&amp;&amp;n&amp;&amp;in.ignore();){ cout<<(line++ ? "\n":""); for(string s;getline(in...
数据结构 | 2013-12-25 22:12 | 阅读 1842 次 | 评论 0 条

矩阵加法

#include<stdio.h> #include<stdlib.h> #include<malloc.h> #include<string.h> typedef struct node { int i; int j; float value; struct node *down; struct node *right; }NODE,*NODEP; typedef struct matrix { int m;int n;int t; NODEP *row; NODE...
数据结构 | 2013-12-24 10:07 | 阅读 1947 次 | 评论 0 条
最新评论