码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
linux下线程
linux下线程 线程与进程的关系: 之前转载的微信文章,进程与线程的差别已经说得比較清楚了。能够查看之前转载的文章。linux进程与线程的差别。 创建一个线程: #include<pthread.h> int pthread_creat(pthread_t * thread,pthread_att ...
分类:编程语言   时间:2017-05-28 12:24:16    阅读次数:213
HDU 2082 普通型母函数
分析: 组成单词好说,价值如何体现? 改变指数就行,例如: 这样,组成的单词,指数就是权值,多项式相乘,指数小于50的就OK; 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 int ch[30]; 6 int a[100]; 7 in ...
分类:其他好文   时间:2017-05-28 11:45:44    阅读次数:166
c++ 用new后delete,而继续输出指针后果
1 #include<iostream> 2 #include<cstring> 3 #include <string.h> 4 5 int main(){ 6 7 int *a =new int[100]; 8 for(int i=0;i<100;i++){a[i]=i;} 9 char *b; ...
分类:编程语言   时间:2017-05-28 11:44:43    阅读次数:147
// 插入排序 源代码
//插入排序 void InsertSort(int *a,int n) { int i=0,j; for(;++i<n;) { for(j=i;--j>=0;) { if(a[j+1]<a[j]){ swap(&a[j+1],&a[j]); } else { break; } } //插入排序 v ...
分类:编程语言   时间:2017-05-28 11:01:27    阅读次数:147
LeetCode--Reverse Integer
//#include <iostream> #include <cmath> #include <stack> //using namespace std; //const int MAXN=10; //int Stack[MAXN]; stack<int> s; class Solution { ...
分类:其他好文   时间:2017-05-28 10:55:30    阅读次数:148
【C语言】编写函数实现库函数atof
//编写函数实现库函数atof #include <stdio.h> #include <assert.h> #include <ctype.h> #include <math.h> double calculate(const char *src, int flag) { double num = ...
分类:编程语言   时间:2017-05-28 10:51:04    阅读次数:154
尝试linux下的debug工具: gdb
hjs@ubuntu:~/projects/ConsoleApplication1$ cat main.cpp#include <cstdio> int main(){// int a = 1; printf("hello from ConsoleApplication1!\n"); return ...
分类:数据库   时间:2017-05-28 10:04:51    阅读次数:203
对接口编程:接口和抽象类
在《大话设计模式》这本书中,我会听到这个字眼“对接口编程”,而在文中的类图中。会提出这样一个疑问?为什么有的用的是:接口?有的用的是抽象类呢? 本文主要介绍下面内容:接口、抽象类。 文章的最后,会给出软考下午设计模式题中的一些做题技巧 ? 什么是接口? 接口是包括一组虚方法的抽象类型,当中每一种方法 ...
分类:其他好文   时间:2017-05-28 10:03:14    阅读次数:145
歌乐电子一道非常easy的笔试题目居然搞错了!!!
题目打开图片就能够看到 void main(void) {union unt { unsigned char uc[4]; unsigned int ui; }; union unt t; t.ui=0x12345678; printf("%d\n",t.uc[1]);} 共同体在嵌入式开发中是非常 ...
分类:其他好文   时间:2017-05-28 09:55:43    阅读次数:194
Unix/Linux环境C编程新手教程(40) 初识文件操作
??1.函数介绍 close(关闭文件) 相关函数 open,fcntl。shutdown,unlink,fclose 表头文件 #include<unistd.h> 定义函数 int close(int fd); 函数说明 当使用完文件后若已不再须要则可使用close()关闭该文件,二close( ...
分类:系统相关   时间:2017-05-28 09:52:52    阅读次数:306
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!