Givennpoints on a 2D plane, find the maximum
number of points that lie on the same straight line./** * Definition for a
point. * struct Point { * ...
分类:
其他好文 时间:
2014-06-07 00:31:01
阅读次数:
233
1.学生成绩统计 要求描述: 用结构数组实现学生信息的统计功能。 struct student
{ long no; /*学号*/ char name[10]; /*姓名*/ char sex; /*性别*/ int age; /*年龄*/ float
score; /*平均成绩*/ } 完成下列任...
分类:
编程语言 时间:
2014-06-07 00:11:26
阅读次数:
305
Sort a linked list inO(nlogn) time using
constant space complexity./** * Definition for singly-linked list. * struct
ListNode { * int val; * L...
分类:
其他好文 时间:
2014-06-06 20:01:30
阅读次数:
333
1、结构中可以声明字段,但是不能够给字段初始值public struct Point {
private int x; x = 1; //错误 1 类、结构或接口成员声明中的标记“=”无效 public Point(int x)...
分类:
其他好文 时间:
2014-06-06 15:57:00
阅读次数:
215
上一次的实验做到可以从pc端读取到MindWave传输过来的脑电波原始数据了。
我是先定义一个结构体,该结构体对应保存所有能从硬件中取到的原始数据。 1 struct FD_DATA 2 { 3 int battery;//电量 4 int
poor_signal;//连接质量...
分类:
其他好文 时间:
2014-06-06 13:14:57
阅读次数:
492
1:C++主要是对于C的继承性做的相当的出色,主要扩充在于程序员可以自己定义自己的数据结构,用数据结构去描述日常生活中的事务,而不是C语言中当当仅有的Struct数据类型等等2:
每一种语言都有自己的编程风格,需要通过实践去养成自己的编程习惯3:程序与算法的区别【1】目的性:算法是求解目的的一系列动...
分类:
编程语言 时间:
2014-06-06 13:08:26
阅读次数:
320
#define MSG_HEAD_LEN 4//消息头部结构typedef struct tagMsg
{ //消息类型 u16 type; //消息体长度 u16 length;}TMsg;void receive(SOCKET s){ char
buffer[1024*28]; //CServM...
分类:
其他好文 时间:
2014-06-06 11:25:33
阅读次数:
243
判断线段与直线的相交 这里有个地方需要注意的就是在 转换的时候容易报错
在叉积完后的判断符号的时候需要注意 这个地方会超出int 的范围2014-06-0320:14:04#include #include #include
#include using namespace std;struct p...
分类:
其他好文 时间:
2014-06-05 12:54:04
阅读次数:
238
测试 代码运行时间linux 中的 中 有个函数可以获取当前时间,精确到 微秒
----> gettimeofday() 1 #include // int gettimeofday(struct timeval *tv,
struct timezone *tz); 2 /***...
分类:
系统相关 时间:
2014-06-02 19:08:37
阅读次数:
337
题目链接又是一个考察对链表基本操作的题目附上代码: 1 /** 2 * Definition for
singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 *
Lis...
分类:
其他好文 时间:
2014-06-02 12:00:52
阅读次数:
226