码迷,mamicode.com
首页 >  
搜索关键字:struct stat    ( 35365个结果)
socket
bind();把一个地址簇中的特定地址赋给socket,Eg:AF_INET,AF_INET6就是把一个ipv4或ipv4地址和端口号组合赋给socket;int bind(int sockfd,const struct sockaddr *addr,socklen_t addrlen);addr:...
分类:其他好文   时间:2014-08-19 14:22:24    阅读次数:203
【learning log】Linux network programming
DNS host entry 包含 DNS database 中有关某一 domin name 或 ip address 的 DNS 信息。1 struct hostent{2 char *h_name;3 char *h_aliases;4 int h_addrtype;5 ...
分类:Web程序   时间:2014-08-19 14:11:15    阅读次数:210
线段树
#include#include#includeusing namespace std;const int maxn=200005;int val[maxn+1];struct node{ int total; int left; int right; int mark;//...
分类:其他好文   时间:2014-08-19 14:08:24    阅读次数:195
ACM试题 - 括号配对问题 - Java中字符串截取和定位问题
ACM试题题源(括号配对问题):http://acm.nyist.net/JudgeOnline/problem.php?pid=2提交代码: import java.util.Scanner; public class Main { public stat...
分类:编程语言   时间:2014-08-19 14:05:54    阅读次数:331
第二套三
#include #define N 16 typedef struct { char num[10]; int s; } STREC; void fun( STREC a[] ) { int i,j; STREC t; for(i=1;i<N;i++) for(j=0;j<N-1;j++) if(a[j].s<a[j+1].s) {t=a[j]...
分类:其他好文   时间:2014-08-19 12:56:54    阅读次数:169
测时间,精确到usec
#include #include #include /* accurate to usec*/void getusertime(){ static struct timeval tpstart,tpend; static float timeuse; static...
分类:其他好文   时间:2014-08-19 12:26:34    阅读次数:192
结构struct
【意义】结构struct是一种粗糙的数据类型,严格意义下的数据类型,不但有数据的内部表示以及表示范围,还要有数据的操作;显然,struct不具备以上要求【定义结构】(1)struct pointe{ doubel x; double y}; //分号不能忘(2)struct可以嵌套定义s...
分类:其他好文   时间:2014-08-19 12:25:14    阅读次数:141
C语言之结构体
1概述结构体就是一个可以包含不同数据类型的一个结构,它是一种可以自己定义的数据类型。2定义结构体类型变量的方法定义结构体变量的一般格式为:struct结构名{类型变量名;类型变量名;...}结构变量;代码如下:structStudent{ charname[8]; intage; }stu1;上面的代码声明了一个..
分类:编程语言   时间:2014-08-19 11:10:04    阅读次数:181
hdoj 1394 Minimum Inversion Number【线段树求逆序对】
#include #include #include using namespace std; const int N = 101000; int a[N]; struct Node { int l,r,num; }; Node tree[4*N]; void build(int l,int r,int o) { tree[o].l=l,tree[o].r=r; t...
分类:其他好文   时间:2014-08-19 11:03:14    阅读次数:222
UVa10034/POJ2560_Freckles(最小生成树)(小白书图论专题)
解题报告 题意: 把所有点连起来,求使用的墨水最少。 思路: 裸最小生成树。 #include #include #include #include #define inf 0x3f3f3f3f using namespace std; struct N { double x,y; } node[110]; int vis[110],n; double mmap[110]...
分类:其他好文   时间:2014-08-19 11:02:54    阅读次数:255
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!