#include #include using namespace std;int main(int argc, char *argv[]){ int i,n,m; string s; while(cin>>m) { while(m--) { cin>>s; n=1; if(s.si...
分类:
其他好文 时间:
2014-08-01 22:59:32
阅读次数:
352
-#include using namespace std;int main(int argc, char *argv[]){ int n,i,sum; string s; cin>>n; while(n--) { cin>>s; for(i=0,sum=1;s[i];i++) { if(...
分类:
其他好文 时间:
2014-08-01 22:51:42
阅读次数:
214
#include using namespace std;int a[1000];int f(int n){ int k=0; while(n) { a[k++]=n%2; n/=2; } return k;}int main(int argc, char *argv[]){ int n,m,...
分类:
其他好文 时间:
2014-08-01 22:45:22
阅读次数:
248
通过大话设计模式一书学习后,c++编写的设计模式代码:
// OOTest.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "Operation.h"
#include "OperationFactory.h"
int _tmain(int argc, _TCHAR* argv[])
{
double resurt=0;
Op...
分类:
其他好文 时间:
2014-08-01 19:55:32
阅读次数:
221
Opencv读取视频代码#include"stdafx.h"#include"highgui.h"intmain(intargc,char* argv[]){cvNamedWindow("avi");CvCapture* capture = cvCreateFileCapture("D:\\samp...
分类:
其他好文 时间:
2014-08-01 19:11:32
阅读次数:
216
C++ Primer 学习笔记第一章 快速入门1.1 main函数 系统通过调用main函数来执行程序,并通过main函数的返回值确定程序是否成功执行完毕。通常返回0值表明程序成功执行完毕; main函数返回值必须是int类型。 参数: main(int argc, char *argv[]) .....
分类:
编程语言 时间:
2014-08-01 15:48:11
阅读次数:
207
#import int main(int argc, const char *argv[]){ NSLog(@"Hello Object-C!"); return (0);}单击Build and GO或Mac键+R,将生成并运行程序;
分类:
其他好文 时间:
2014-08-01 15:35:41
阅读次数:
176
最近用Qt + VS2008 来写点程序,但会有中文乱码现像,需要加上如下代码解决#include "myclass.h"#include #include int main(int argc, char *argv[]){ QApplication a(argc, argv); QTe...
分类:
其他好文 时间:
2014-08-01 10:44:21
阅读次数:
242
#include using namespace std;int main(int argc, char *argv[]){ int i,n,m; char data1[10][20],data2[10][20]; scanf("%d",&n); for (i=0;i...
分类:
其他好文 时间:
2014-08-01 04:42:41
阅读次数:
239
//重新整理的比较清楚的opencv框架#include "stdafx.h"#include #include #include using namespace std;using namespace cv;int _tmain(int argc, _TCHAR* argv[]){ Mat las...
分类:
其他好文 时间:
2014-07-31 23:29:50
阅读次数:
343