码迷,mamicode.com
首页 >  
搜索关键字:temp    ( 7776个结果
C#基础:值类型、引用类型与ref关键字
在C#中,ref的意思是按引用传递。可以参考C++:inta=10,b=20; voidswap(intx,inty) { inttemp=x; x=y; y=temp; }如果简单的调用这个swap,比如:swap(a, b),那么你根本没办法交换这两个变量的值,因为x和y都是形参,在swap返回...
分类:Windows程序   时间:2015-07-20 01:20:16    阅读次数:183
strstr
const char* strstr(const char *str, const char* substr){ int i, j, temp; for (i = 0; str[i] != '\0'; i++) { j = 0; temp = i; //...
分类:其他好文   时间:2015-07-19 21:23:44    阅读次数:103
中国天气网接口返回json格式分析及接口(XML、图片接口)说明
实时天气:city"北京"//城市cityid"101010100"//城市编码temp"17"//当前温度WD"东风"//风向WS"2级"//风力SD"70%"//相对湿度WSE"2"//风力time"14:20"//更新时间isRadar"1"//是否有雷达图Radar"JC_RADAR_AZ9...
分类:Web程序   时间:2015-07-19 19:39:10    阅读次数:259
交换两个变量的不同实现方式
#include #define SWAP1(a,b) \{ \ int temp = a; \ a = b; \ b = temp; \}#define SWAP2(a,b) \{ \...
分类:其他好文   时间:2015-07-19 17:42:50    阅读次数:92
直接插入排序
public class StraightInsertionSort { public static void Sort(int[] array) { for (int i = 1; i = 0 && temp < array[j]; j--)...
分类:编程语言   时间:2015-07-19 11:44:42    阅读次数:137
C# char 和string之间转换
har数组要转换成string可没想象的那么容易。需要使用到System.Text.StringBuilder!实例如下:char[] temp={a,b,c};System.Text.StringBuildersb =newSystem.Text.StringBuilder();sb.Append...
分类:Windows程序   时间:2015-07-19 00:07:10    阅读次数:299
hdu_5276
//不管怎么样还是希望天天做笔记把,真是太懒了#include#include#include#includeusing namespace std;vectors[2160001]; int main(){ int t; for(int i=0;i2160000)temp=4...
分类:其他好文   时间:2015-07-18 22:33:31    阅读次数:98
【bzoj3343】 教主的魔法(分块入门)
题意:一个含n个数的区间(n#include#include#includeusing namespace std;int add[5000100],num[5000100];int pos[5000100],b[5000100];int t,n,m,block,temp;char str[5050...
分类:其他好文   时间:2015-07-18 16:56:03    阅读次数:84
解决当打开Unity时 提示项目已经打开,而自己之前并没有打开过(可能之前异常关闭)的问题
当打开Unity时 提示项目已经打开,而自己之前并没有打开过(可能之前异常关闭)发生这种情况时 打开项目目录中的 Temp文件夹,可以找到 一个UnityLockfile 文件将这个文件删除就可以正常打开了
分类:编程语言   时间:2015-07-18 16:50:26    阅读次数:130
排序算法之冒泡排序
基本思想首先第一个元素和第二个元素比较,如果第一个大,则二者交换,否则不交换;然后第二个元素和第三个元素比较,如果第二个大,则二者交换,否则不交换……一直按这种方式进行下去,最终最大的那个元素被交换到了最后,一趟冒泡排序完成。代码public void BubbleSort(int[] a, int n) { int temp; for (int i = 1; i < n; i++)...
分类:编程语言   时间:2015-07-18 11:07:03    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!