??
MySQL创建数据表(中)
三、数据字段属性
1、unsigned【无符号】
可以让空间增加一倍
比如可以让-128~127增加到0~255
注意:只能用在数值型字段
2、zerofill【前导零】
e.g. createtable if not exists t2(num int(5) zerofill,price float(7,2)zerofill,na...
分类:
数据库 时间:
2015-05-08 15:03:36
阅读次数:
205
阅读程序“简单C++学生信息管理系统”,找出其中出现构造函数、友元函数、运算符重载、静态数成员语法现象出现的位置,仔细体会其用法,在以后的设计中能够灵活应用有关方法和技巧。
#include
#include
using namespace std;
#define MAX 100
class CDate // 定义日期类
{
private:
unsigned short in...
分类:
其他好文 时间:
2015-05-08 14:58:04
阅读次数:
121
题目:Problem Description求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方”Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1int main(void) { unsigned int A, B, i, result; whi...
分类:
其他好文 时间:
2015-05-08 14:39:21
阅读次数:
102
#include #include #include using namespace std;#define NUM_THREAD 10class person {public: person() { } person(int name, unsigned int thread_n...
分类:
编程语言 时间:
2015-05-08 14:38:59
阅读次数:
226
??
Linux下C++/C连接MySQL数据库(三)
--处理返回数据
一、通过返回结果集中的字段数
[cpp]
view plaincopyprint?
unsigned int mysql_field_count(MYSQL * connection); //将MYSQL_ROW的值作为一个存储了一行数据的数组...
unsigned i...
分类:
数据库 时间:
2015-05-08 13:02:54
阅读次数:
193
In the C++ STL, the vector size() function return size_t, which is unsigned int, not int. So imagine this, define an empty vector v, and v.size() shou...
分类:
其他好文 时间:
2015-05-08 06:59:57
阅读次数:
159
【项目2-Time类中的运算符重载】
实现Time类中的运算符重载。
[cpp] view
plaincopyprint?
class CTime
{
private:
unsigned short int hour; // 时
unsigned short int minute; // 分
...
分类:
其他好文 时间:
2015-05-07 22:11:48
阅读次数:
162
1. 十六进制char* 转 Binary char*例如:“fedcba9876543210”
转换为:char bin[8] ={0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10}形式。
代码:/*两个字符转换成一个字符,长度为原来的1/2*/
static void Hex2Char(char *szHex, unsigned char *rch)
{...
分类:
编程语言 时间:
2015-05-07 16:52:13
阅读次数:
384
代码:#include
#include
#include
#include
unsigned char pbuffer[1024*1024*8];
void testssd1(int *ch )
{
int i=0;
int fd;
if(*ch==0)
fd = open("/ssd1/test.dat", O_RDWR...
分类:
系统相关 时间:
2015-05-07 16:47:11
阅读次数:
181
#include
#define uchar unsigned char
#define uint unsigned int
uint table[] = {0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f};
void delay(void) {
uint a = 50000;
while(a--);
}
void main() {
in...
分类:
其他好文 时间:
2015-05-07 12:27:35
阅读次数:
245