【华为OJ】【算法总篇章】【华为OJ】【070-记票统计】【工程下载】题目描述请实现接口:
unsigned int AddCandidate (char* pCandidateName);
功能:设置候选人姓名
输入: char* pCandidateName 候选人姓名
输出:无
返回:输入值非法返回0,已经添加过返回0 ,添加成功返回1Void Vote(char* pCandidateNa...
分类:
其他好文 时间:
2016-05-16 08:15:55
阅读次数:
216
1.包含头文件 (对于VC++6.0,需要自己下载GDI+的SDK,并定义ULONG_PTR) #ifndef ULONG_PTR #define ULONG_PTR unsigned long* #endif (对于VC++6.0,需要自己下载GDI+的SDK,并定义ULONG_PTR) #inc... ...
分类:
其他好文 时间:
2016-05-14 00:50:22
阅读次数:
124
class EncryFile { public: void CryptString(unsigned char chKey); //加、解密字符串 bool LoadStringFromFile(const CString &strFileName, unsigned char chKey); / ...
分类:
其他好文 时间:
2016-05-13 19:08:39
阅读次数:
202
/*
*copyright(c) 2016,烟台大学计算机学院
*All rights reserved
*文件名称:test.cpp
*作者:谭泽纯
*版本:v6.0
*
*问题描述:
实现Time类中的运算符重载。
class CTime
{
private:
unsigned short int hour; // 时
...
分类:
编程语言 时间:
2016-05-13 15:17:18
阅读次数:
275
题目: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32- ...
分类:
其他好文 时间:
2016-05-13 11:36:09
阅读次数:
144
在看C专家编程,遇到一段代码: 这里的本意显然是要给x赋值,但实际上却不会进到这里,这里引出了2个问题: 1.TOTAL_ELEMENTS的类型 sizeof返回值的类型为size_t,而typedef unsigned int size_t,所以TOTAL_ELEMENTS - 2的类型为unsi ...
分类:
其他好文 时间:
2016-05-13 11:15:08
阅读次数:
125
errror : implicitly declaring function 'malloc' with type void *(unsigned long ) Be sure to include the correct header file. #include <stdlib.h> Casti ...
分类:
其他好文 时间:
2016-05-13 10:08:20
阅读次数:
3911
%@ 对象%d,%i 整型 (%i的老写法)%hd 短整型%ld , %lld 长整型%u 无符整型%f 浮点型和double型%0.2f 精度浮点数,只保留两位小数%x: 为32位的无符号整型数(unsigned int),打印使用数字0-9的十六进制,小写a-f;%X: 为32位的无符号整型数( ...
分类:
移动开发 时间:
2016-05-13 10:05:06
阅读次数:
165
1.冒号(:)用法 (1)表示机构内位域的定义(即该变量占几个bit空间) typedef struct _XXX{ unsigned char a:4; unsigned char c; } ; XXX (2)构造函数后面的冒号起分割作用,是类给成员变量赋值的方法,初始化列表,更适用于成员变量的常 ...
分类:
编程语言 时间:
2016-05-13 08:13:32
阅读次数:
133
《effective C++》阅读笔记01
size_t是c++计算个数时使用的某种不带正负号(unsigned)类型。它也是vector,deque和string内的operator[]函数接受的参数类型。
分清楚声明式和定义式,对对象而言,定义式是编译器为此对象拨发内存的地点;对function 或function template而言,定义式提供了代码本身。
default构造函数要不没有参数...
分类:
编程语言 时间:
2016-05-13 01:31:01
阅读次数:
197