返回   cpper编程论坛 > Blog
注册账号 论坛帮助 会员列表 日历事件 搜索 今日新帖 标记版面已读

旧

C++对象模型(二)

发表于 2006-09-23 04:01 AM 作者: tomato
C++对象模型(二)
高级会员
发表在 未分类
评论 0 tomato 当前离线
旧

C++对象模型(一)

发表于 2006-09-19 11:13 PM 作者: tomato
C++对象模型(一)
高级会员
发表在 未分类
评论 0 tomato 当前离线
旧

CRT源码解析(三)字符串函数(2)

发表于 2006-05-22 10:52 AM 作者: tomato
CRT源码解析(三)

字符串函数(2)

0、代码
c++ 代码:
代码:
int main()
{
    const char* src = "Hello, world";
    char* dest = new char[100];

    strlen(src);
    strchr(src, ‘l’);
    strrchr(src, ‘l’);
    strcpy(dest, src);
    strcat(dest, src);
    _strset(dest, ‘a’);
    strpbrk(dest, src);
    strcmp(src, dest);
    strcoll(src, dest);
    strxfrm(dest,
...
高级会员
发表在 未分类
评论 2 tomato 当前离线
旧

CRT源码解析(二)字符串函数(1)

发表于 2006-05-07 02:55 AM 作者: tomato
CRT源码解析(二)

字符串函数(1)

0、代码:
c++ 代码:
代码:
#include <string.h>

int main()
{

    int* src = new int[10];
    int* dest = new int[10];

    memset(src, 0, sizeof(int) * 10);
    *(char*)(&src[5]) = ‘a’;
    memchr(src, ‘a’, sizeof(int) * 10);
    memcpy(dest, src, sizeof(int) * 10);
    memmove(dest, src, sizeof(int) * 10);
    memcmp(src, dest, sizeof(int)
...
高级会员
发表在 未分类
评论 2 tomato 当前离线
旧

CRT源码解析(一)

发表于 2006-05-05 04:41 PM 作者: tomato
环境:Visual C++ 8, Windows XP,


一、long long int的计算
0、代码:
c++ 代码:
代码:
int main()
{
    long long int lhs = 0x123456789abcdef0;
    long long int rhs = 0x123456789abcdef0;
    long long int result = 0;

    result = lhs + rhs;
    result = lhs - rhs;
    result = lhs * rhs;
    result = lhs / rhs;
    result = lhs % rhs;
    result = lhs << 9;
    result = rhs >> 9;
...
高级会员
发表在 未分类
评论 1 tomato 当前离线

所有时间均为格林尼治时间 +9。现在的时间是 02:11 PM


Powered by vBulletin® 版本 3.7.0
版权所有 ©2000 - 2008,Jelsoft Enterprises Ltd.
(C) Copy Right All Right Reserved 2001 - 2007

Search Engine Friendly URLs by vBSEO 3.1.0