- 博客(2)
- 收藏
- 关注
原创 请教一个vector的push_back问题
#include "stdafx.h" #include #include using namespace std; static long g_g = 0, g_x = 0; typedef struct tagMy { int i; char sz[32]; tagMy() { cout memset(this, sizeof(tag
2013-02-28 17:32:01 484
原创 请教一个sizeof在模版函数内无法正常获取大小的问题。
#include using namespace std; template void Swap(T a[], T b[], int n) { for ( int n = 0; i { T tm = a[i]; a[i] = b[i]; b[i] = tm[i]; } } /* 在这里我想把Swap改写一下,少传一个参数进来,把代码改写成
2013-01-24 12:01:39 386
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人