码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
数据结构-冒泡排序
#include using namespace std;void BubbleSort(int* a,int n){ for(size_t i=0;i a[j+1]){ int tmp = a[j]; a[j] = a[j+1]; ...
分类:其他好文   时间:2014-05-08 21:59:19    阅读次数:264
SQLite3 C语言API入门
下载SQLite3我们下载sqlite源码包,只需要其中的sqlite3.c、sqlite.h即可。最简单的一个创建表操作#include#include"sqlite3.h"intmain(intargc,char*argv[]){constchar*sql_create_table="creat...
分类:数据库   时间:2014-05-08 20:50:24    阅读次数:543
angularjs script 标签不能通过ng-include 加载
今天发现一个通过ng-include 加载的页面在ie8下不显示不出来,检查发现引用页面里有script 标签,搜索发现是因为https://github.com/angular/angular.js/issues/3756已经不支持在ng-include 里加载script标签。解决办法:依照ne...
分类:Web程序   时间:2014-05-08 20:40:04    阅读次数:386
使用对象中的几个key值来排序
环境:vs2012 win7 c++1 #include2 写一个比较函数,体现对象间是按照哪些key值来排序的。3 使用std::sort函数。例子如下:#include /*排序规律:星级最大的排前面,其次等级越大排前面,再其次是经验越大排前面,最后是其次是ID值越大排越后面。*/bool my...
分类:其他好文   时间:2014-05-08 19:54:37    阅读次数:226
宽字符和窄字符之间的转换,以及对中文的处理问题总汇
直接代码:注:编译环境VS2010 SP1 1 /*实现宽字节和窄字符转换以及中文文件的输入输出*/ 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 ...
分类:其他好文   时间:2014-05-08 19:39:28    阅读次数:583
hdu 1159
题意:求最长子序列#include#includeusing namespace std;int max(int x,int y){ if(x>y) return x; return y;}int map[1001][1001];char s1[1001],s2[1001];int main(){ ...
分类:其他好文   时间:2014-05-07 20:07:29    阅读次数:202
求N个数的最大公约数
#include #include #define N 100int gcd(int x,int y){ int t; if(x<y) { t=x; x=y; y=t; } return (y==0)?x:gcd(y,x%y);...
分类:其他好文   时间:2014-05-07 19:29:36    阅读次数:309
hdu 1176
数塔问题#include#includeusing namespace std;int a[100009][12];int maxi(int a,int b,int c){ int max1; max1=a>b?a:b; max1=max1>c?max1:c; return ...
分类:其他好文   时间:2014-05-07 19:25:00    阅读次数:302
[WinAPI] 串口1-创建[包括: 打不开串口]
本来是用一个USB扩展把一个USB括成4个,然后把USB转串口连接上,虽然设备管理器可以找到用SSCOM也能找到,但是用API就是打不开,最后把USB转串插在电脑的一个USB上就可以啦! 1 #include 2 #include 3 #include 4 5 bool openp...
分类:Windows程序   时间:2014-05-07 19:19:37    阅读次数:467
operator++() 和operator++(int)
#include using namespace std;class A{public: int a;public: A& operator++(){ cout<<"A& operator++()"<<endl; a=a+1; return *this; } A operator++(int){ c...
分类:其他好文   时间:2014-05-07 18:37:55    阅读次数:208
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!