码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
C++关键字作用总结
1、在当前文件中引入命名空间2、在子类中使用using声明引入基类成员名称在private或者protected继承时,基类成员的访问级别在派生类中更受限:class Base{public:std::size_t size() const{return n;}protected:std::size...
分类:编程语言   时间:2014-10-15 14:59:40    阅读次数:158
Cocos2d-x 3.2编译生成Android程序出错Error running command, return code: 2的解决方法
用Cocos2d-x 3.2正式版创建项目,结果使用cocos compile -p android编译生成APK程序,结果悲剧了,出现以下错误。Android NDK: Invalid APP_STL value: c++_staticAndroid NDK: Please use one o.....
分类:移动开发   时间:2014-10-15 14:13:30    阅读次数:2057
leetcode - Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". class Solution { public: std::string addBinary(std::string a, std::string b)...
分类:其他好文   时间:2014-10-15 13:17:30    阅读次数:174
c语言判断一个数是不是素数
#include #include int main(){ // 输入一个整数数判断是不是素数 // 方法是用这个数去除2到根号num这些数如果为0则不是素数 int m,i,k; printf("请输入一个整数:"); scanf("%d",&m); k=(int)sqrt(m); ...
分类:编程语言   时间:2014-10-15 13:15:00    阅读次数:177
二分查找
//循环实现int binsearch(int* a, int i, int j, int goal){ if(a == NULL) return -1; while(i goal){ j = mid - 1; } else...
分类:其他好文   时间:2014-10-15 13:08:50    阅读次数:141
C语言求S(n) = a+aa+aaa+aaaa+...+aa..a之值,其中a是一个数字,n表示a的位数例如:2+22+222+2222+22222(此时n=5),n和a都从键盘输入。
求S(n) = a+aa+aaa+aaaa+...+aa..a之值,其中a是一个数字,n表示a的位数例如:2+22+222+2222+22222(此时n=5),n和a都从键盘输入。#include int main(){ int n; int a; int sum = 0; int k = ...
分类:编程语言   时间:2014-10-15 12:30:00    阅读次数:150
SDUT OJ类型转换函数的应用
题目描述处理一个复数与一个double数相加的运算,结果存放在一个double型变量d1中,输出d1的值。定义Complex(复数)类,在成员函数中包含重载类型转换运算符:operator double(){return real;}输入输入占两行:第1行是一个复数的实部和虚部,数据以空格分开。第2...
分类:其他好文   时间:2014-10-15 11:12:00    阅读次数:162
Length of Last Word
[leetcode]Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string....
分类:其他好文   时间:2014-10-15 11:06:50    阅读次数:205
高精度阶乘
#include#includeconst int maxn=3000;int f[maxn];int main(void){ int i,j,n; scanf("%d",&n); memset(f,0,sizeof(f)); f[0]=1; for(i=2;i=0;j...
分类:其他好文   时间:2014-10-15 10:59:00    阅读次数:142
没有main函数的helloworld
几乎所有程序员的第一堂课都是学习helloworld程序,下面我们先来重温一下经典的C语言helloworl /* hello.c */ #include int main() { printf("hello world!\n"); return 0; } 这是一个简单得不能再单的程序,但它包含有一个程序最重要的部分,那就是我们在几乎所有代码中都能看到的main函数,我们编...
分类:其他好文   时间:2014-10-15 10:54:07    阅读次数:128
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!