BBYR Achieve
返回首页
版面

CPP

学术科技 · 当前来自首页固化板块目录。

5815
本版帖子
镜像谁看了c++primer第十章的textquery的程序吗?

源代码组成程序后 运行的时候,用dos命令行输入参数 怎么每次都打不开文件呢?

butme2008/11/1CPP最后回复 2008/11/1· butme
7
镜像【求助】关于链接错误

一个小程序,从书上敲上去的,链接出错了,错误如下: Linking... nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK20…

qingping2008/10/31CPP最后回复 2008/10/31· yuna
5
镜像问个问题,关于数组参数

有这么一段程序: #include <stdio.h> #include <stdlib.h> char ga[]="abcdefghijklm"; void func(char ca[]) { printf("%#x\n",&ca); printf("%#x\n\n",&(ca[0])); } int main() …

fifarcheung2008/10/31CPP最后回复 2008/10/31· Samuel526
4
镜像问个超弱问题: int* p = new int[10] 和 int p[10]是什么区别

我怎么看就是一样的,可是放到visual c++ 2005就不一样了 ================== for(int i=0; i<10; i++) p[i]=i; =================== 上面这段语句,int* p = new int[10] 根本没有分配空间,int p[10]倒是正常的 不明…

Chrainy2008/10/28CPP最后回复 2008/10/31· lodas
5
镜像直接操作文件缓冲区

大家有没有试过直接操作文件缓冲区?就像这样: FILE *tempfile; char buf[1280]={0}; int i=0; tempfile=fopen("d:\\temp\\test.txt","wb"); setvbuf(tempfile,buf,_IOFBF,1280); for(i=0;i<1280…

erabbit2008/10/27CPP最后回复 2008/10/30· rebirthatsix
9
镜像systempause的问题

刚学写程序,什么都不懂,高手请指教一下 代码写好之后在cygnus下编译运行,system("pause')为什么不起作用??

zxf5512008/10/30CPP最后回复 2008/10/30· PtwCJ
13
镜像[求助]二维指针参数传递错误

#include <stdio.h> void fun(const int **a) { printf("%d", a[0][0]); } int main(void) { int a[2][2] = {1, 2, 3, 4}; fun(a); return 0; } int** 和int[][]不能等同吗? 报内存错…

crossJ2008/10/29CPP最后回复 2008/10/30· kane9909
15
镜像结构体怎么存储可变数据?

假设结构体里面可能有1-100个成员,成员的个数是不定的,每个成员都是一个不能预知 长度(假设有上限)的字符串,具体的字符串要在程序运行的时候才能获取,应该怎么构 造这个结构体,尽量的节省内存空间? 初步是想设置100个字符串指针,不使用的就直接置为NULL,但是这样还是会浪费一些不 用的指针,请问还有更好的方法吗?

white1272008/10/29CPP最后回复 2008/10/29· ericyosho
14
镜像c++调试出问题

#include<iostream> #include<math.h> using namespace std; class Point { public: Point(int xx=0,int yy=0) {X=xx;Y=yy;} Point(Point &p); int GetX(){return X;} int …

dramly2008/10/29CPP最后回复 2008/10/29· yegle
14
镜像求教一个关于指针的问题

是一个最简单的链表操作 struct student { long num; char *string[20]; student *next; }; student *creat(void) { student *head,*p1,*p2; head = NULL; p1 = p2 = (student*)malloc…

delaini2008/10/29CPP最后回复 2008/10/29· NecPro
1
镜像[求助]虚继承的大小问题

#include <iostream> #include <memory.h> #include <assert.h> using namespace std; class A { char k[3]; public: virtual void aa(){}; }; class B:public virtual A {…

Avil2008/10/29CPP最后回复 2008/10/29· Nathan
1
镜像[求助]请教大牛一个关于DLL hook的问题

想实现一个hook,监视某个应用程序的启动,可以根据注册表得到某个应用程序的位置,HOOK能做吗? 有没有DEMO代码可供参考?

vivin2008/10/28CPP最后回复 2008/10/29· ZenZero
5
镜像内联函数的inline关键字问题

用下面方式定义内联函数的时候,代码中出现的那两个地方的inline关键词是不是只要有一个就行了?还是说哪个inline是必须写的? [quote]class A { inline void func(); }; inline void A::func() { }[/quote]

ATV2008/10/24CPP最后回复 2008/10/28· calmsea
4
镜像[求助]_TCHAR*到string的转换怎么做?

RT,这两个能转吗?怎么我都搜不到呢……

mas2008/10/28CPP最后回复 2008/10/28· mas
9
镜像[求助]关于string的一段程序 请达人指点 .....

#include<string> #include<iostream> using namespace std; enum Course { CH, MA, EN, CS,PH,CM}; class Record //定义记录 { public: // Record_Head rh; //记录头部 int SN; //…

Cloudeagle2008/10/26CPP最后回复 2008/10/28· NecPro
4