BBYR Achieve
返回首页
版面

CPP

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

5815
本版帖子
镜像请教BeginUpdateResource问题,请大家帮忙~

hFile = BeginUpdateResource("foot.exe",TRUE); errorNum = GetlastError(); 出现问题:hFile始终为空,而errorNum始终为0,请高手指点~~ “foot.exe”换成别的可执行程序也是同样问题。。。。奇怪。。。

txyx2009/2/27CPP最后回复 2009/2/27· txyx
1
镜像请教:关于c++中的输入结束符

#include <iostream> using namespace std; void main() { int i; int sum=0; while(cin>>i) sum+=i; cout<<sum<<endl; } 输入:3 4 5 6 得不到:18 也就是说输入 3 4 5 6回车后并不能输出和 谢谢

Rickyay2009/2/27CPP最后回复 2009/2/27· nanweishui
20
镜像~~我想要个图像格式转换的程序

C++环境,想要把bmp、gif、jpg转换成灰度图像,该怎么做呢?

wp772009/2/26CPP最后回复 2009/2/27· wp77
4
镜像重载到底是语言特征还是面向对象的一种多态呢?

有的书上说重载不属于“面向对象编程”。只是一种语言特性与多态无关与面向对象无关。 网上说重载与覆盖是Java 实现多态两种方式。 这怎么解释比较好呢?

lodas2008/11/19CPP最后回复 2009/2/26· shenlei
12
镜像[求助] 请达人指教关于标准库的 ios::in 和ifstream::in

贴段代码: #include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, char* argv) { //ifstream il("d:\\1.txt",ios::in); ifstrea…

lblz2009/2/24CPP最后回复 2009/2/26· taps
1
镜像一个令人费解的operator重载,如何调用呢?

class SocketException { public: enum ErrorCodes { errBadHostName, errNoIPAddress, errDNSError, errNoProtocolSupport, errKernelMemory, errCannotConvertToIPv4, er…

zieckey2009/2/25CPP最后回复 2009/2/26· zieckey
5
镜像求问一个模板的问题

Node.h文件 #include<iostream.h> template<class T> class Node { public: Node(const T&e); private: T element; } Node.cpp文件 #include"Node.h" template<class T> Node<T…

lshw2009/2/26CPP最后回复 2009/2/26· HyMu
1
镜像模板函数声明能和实现分开么?

现有一个模板函数,声明是在head.h文件中 template <typename Comparable> const Comparable &findMax(const vector<Comparable> &a); 实现实在findMax.cc中 template <typename Comparable> con…

lishuaigirl2009/2/24CPP最后回复 2009/2/26· wks
4
镜像请教在C中,用什么函数取timestamp

rt

quanquan2009/2/25CPP最后回复 2009/2/25· taps
1
镜像【请教】Hash表的结构定义,采用双向链表解决冲突

#define ULONG unsigned long #define KeyType unsigned long /* 链表节点结构 */ typedef struct tagDllNode { tagDllNode *pstNextNode; /* 下一节点指针 */ tagDllNode *pstPreNode;…

gfbyr2009/2/24CPP最后回复 2009/2/25· Wing
5
镜像咨询个函数指针的调用问题?

如题,函数指针在调用时为何能用这样两种方法呢? pFun(...) (*pFun)(...) 是不是有什么特别的隐藏转换了啊? 没有搞明白,谢谢指点!

fwm20082009/2/24CPP最后回复 2009/2/24· Xer
3
镜像C 语言的fopen的返回值问题

man文档中定义了fopen返回FILE指针,可是我也经常看到这种写法: int fd = fopen(filename, "a+"); 而且这种写法也是可以正常工作的,有点纳闷,虽然指针就是整型,可是这样不会引起隐患吗?为什么有那么多的程序这样写?

traffy2009/2/22CPP最后回复 2009/2/23· abobo
9
镜像关于malloc和free

看书有这样一段程序: #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct TAG_datastruct{ char* string; }datastruct; datastruct* getinput(void); void…

pineapple2009/2/23CPP最后回复 2009/2/23· pineapple
4
镜像怎么在循环中输出不同文件

例如: ofstream out_file; for(i=0;i<5;i++) { outfile.open("a.txt"); outfile<<b;//这里b相当于一个数,或者数组之类的,具体代码省略 outfile.close() } 请问怎么才能对于每一次循环,让b输出到一个不同的文件中,比如a0.txt,a1…

xiecaiji2009/2/23CPP最后回复 2009/2/23· xiecaiji
4
镜像【求教】C++中函数模板重载问题[已解决]

template<typename T> void f1(unsigned int a, T b) { cout << "1st\n"; }; template<typename T> void f1(T a, T b) { cout << "2rd\n"; }; int main() { f1(1,2); retur…

flyingmiao2009/2/7CPP最后回复 2009/2/23· Bergwolf
2