首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴gougoudan的代码贴全部
// 功能:跳过字符串前导空白与正负符号
// ih: 输入字符串
// cnt: 输入字符个数
const char* __SkipLeadSignBlank(const char ih, unsigned int cnt)
{
    const char *s = ih, *h = ih;
    do {
        const auto c = *s;
        if (('-') == c) continue;
        if (('+') == c) continue;
        if (::isblank(c)) continue;//(c == (' ')) || (c == ('\t'))
        if (0 == c) return NULL;
......................
阅读全部 | 2020年6月11日 10:07
// 功能:跳过字符串前导空白与正负符号
// ih: 输入字符串
// cnt: 输入字符个数
const char* __SkipLeadSignBlank(const char ih, unsigned int cnt)
{
    const char *s = ih, *h = ih;
    do {
        const auto c = *s;
        if (('-') == c) continue;
        if (('+') == c) continue;
        if (::isblank(c)) continue;//(c == (' ')) || (c == ('\t'))
        if (0 == c) return NULL;
......................
阅读全部 | 2020年6月11日 10:03
#include <stdio.h>
#include <string.h>
#pragma warning(disable:4996)
#define  N 20

#define Bool  int
#define True  1
#define False 0

typedef struct AddressBook
{
    char _name[N];
......................
阅读全部 | 2020年6月8日 16:59
#include <iostream>
#include <cstring>
using namespace std;

class Employee
{
public:
    virtual void pay(){ }   // 第一题 这一行不要
    string name;
    float  salary;
};

......................
阅读全部 | 2020年6月8日 15:24
#include <iostream>
#include <sstream>
#include <cstring>
#include <cassert>
using namespace std;

template <typename Type, int Count>
class Array
{
    enum { sz = Count };
    Type i[Count];

......................
阅读全部 | 2020年6月8日 11:41
#include "../require.h"
#include <iostream>
#include <sstream>
#include <cstring>
using namespace std;

template <typename Type, int Count>
class Array
{
    enum { sz = Count };
    Type i[Count];

......................
阅读全部 | 2020年6月8日 11:31
#include "stdio.h"

typedef unsigned char   uint8;
void showBinary(const char* name, int c)
{
    char res[32] = {};
    char* p = &res[31];
    for (int i = 8; i--; c >>= 1){
        *--p = (c & 1) + '0';
    }
    printf("%s = %s", name, p);
}
......................
阅读全部 | 2020年6月7日 22:10
#include "stdio.h"

typedef unsigned char   uint8;
void showBinary(const char* name, int c)
{
    char res[32] = {};
    char* p = &res[31];
    for (int i = 8; i--; c >>= 1){
        *--p = (c & 1) + '0';
    }
    printf("%s = %s", name, p);
}
......................
阅读全部 | 2020年6月7日 22:10
#include "stdio.h"
int main()
{
    float money;
    float k1;
    int year, hour;
    scanf("%d %d", &year, &hour);
    if (year < 5)
        k1 = 30;
    else
        k1 = 50;

......................
阅读全部 | 2020年6月7日 10:44
#include <iostream>
using namespace std;

struct HuffNode
{
    float weight;
    int parent;
    int lchild;
    int rchild;
};

//实现哈夫曼编码, 返回根节点
......................
阅读全部 | 2020年6月6日 22:34
上一页 3 4 5 6 7 8 9 10 11 12 下一页
gougoudan