C风格字符串 如下示例代码,c文件, #include?<stdio.h>
#include?<stdlib.h>
#include?<string.h>
void?travel_str(){
????char?x?=?0x21;?//字符?!
????while?(x<=0x7e)?{
????????...
分类:
其他好文 时间:
2015-10-03 14:29:19
阅读次数:
135
递归汉诺塔 双层递归
#include
void han(int n, char A, char B, char C)
{
static int num = 1;
std::cout << "第" << num << "次";
num++;
if (n<1)
{
return;
}
else
{
han(n - 1, A, C, B);
std::cout "...
分类:
编程语言 时间:
2015-10-03 14:28:41
阅读次数:
185
学了很长时间C/C++有时指针方面还是有点乱。希望大神发现如果下面有不对的地方请指出。我发现之所以我乱就是因为中文表述不准确的问题,比如,地址值和地址#include #include using namespace std;void swap1(string* str1,string* str2)...
分类:
编程语言 时间:
2015-10-03 13:11:04
阅读次数:
146
6.1 类与对象的概念6.2 定义类 1 class Cylinder { 2 double radius; 3 int height; 4 double pi; 5 6 void setCylinder(double r, int h, double pi) {...
分类:
编程语言 时间:
2015-10-03 11:56:21
阅读次数:
264
先通过一个小程序来看一看:#include
void foo(int x, int y, int z)
{
printf("x = %d at [%X]n", x, &x);
printf("y = %d at [%X]n", y, &y);
printf("z = %d at [%X]n", z, &z);
}int main(int argc, char *argv[])
{
foo(100,...
分类:
编程语言 时间:
2015-10-03 10:43:25
阅读次数:
215
public class CrossContainerIteration{ public static void display(Iterator it){ while(it.hasNext()){ Pet tmp = it.next...
分类:
编程语言 时间:
2015-10-03 10:40:58
阅读次数:
214
objc block参数上的__autoreleasing怎么理解看到这样的block的声明- (void)XXXXXXX:(NSError * __autoreleasing *)error{ ... *error = ...... ...} 于是将__autoreleasing去掉,...
分类:
其他好文 时间:
2015-10-03 00:55:59
阅读次数:
261
今天看代码时看到 if (argument1 === void 0 || typeof argument1 === 'object') {啥意思?概述void 运算符会对它的操作数表达式进行求值,然后忽略掉求值的结果,直接返回 undefined。语法void expression描述我们经常会在一...
分类:
编程语言 时间:
2015-10-03 00:54:56
阅读次数:
270
设置tableview的滚动范围有时候tableview的footerview上的内容需要向上拖动界面一定距离才能够看见,项目中因为我需要在footerviw上添加一个按钮,而这个按钮又因为这个原因点不中,所以找到了解决办法! 添加如下方法即可-(void)scrollViewDidScroll:....
分类:
移动开发 时间:
2015-10-02 23:53:06
阅读次数:
374
/// /// 根据源对象的属性填充目标对象的对应字段 /// /// 源对象 /// 目标对象 public static void GetViewModelProperties(object source, object ...