使用VS2010 建立了MFC,然后用类向导调入了一个类型库,是个DLL的组件接口
然后我在cpp中include了生产的.h文件,编译
就提示:
1>d:\openfristcard\openfristcard\release\taxcardx.tlh(414): error C2556: “_bstr_t IGoldTax::GetInfo(vo……继续阅读 »
10年前 (2015-11-26) 2130浏览
0个赞
这是递归代码
void MERGE(vector<int>::iterator ite, int left, int right, int mid){
//
if (left == right)return;
//
else{
//
MERGE(ite, left, mid, (left + mid) / 2);
MERGE……继续阅读 »
10年前 (2015-11-26) 1468浏览
0个赞
做一个分布式存储系统的项目,就是将一个文件分块存储到多个存储服务器中,这个系统分为3块,包括客户端(client),控制端(tracker),存储端(storage)。client有n多台,tracker有1台,storage有n多台,当client要上传文件时,会请求tracker,tracker会通过一算法计算给出最合适的多台storage(IP)及分……继续阅读 »
10年前 (2015-11-26) 1306浏览
0个赞
最近用live555做rtsp客户端,修改了Live555自带的openRTSP,能支持多个实例了;
但联1080P的视频流超3路视频就有花屏, 联704×576的16路也有同样的问题,不知道是给解码器视频帧不对,还缺少什么参数,如sps,pps:
在FileSink::afterGettingFrame函数如下:
void FileSink::……继续阅读 »
10年前 (2015-11-26) 1433浏览
0个赞
在写一个小游戏,有些配置数据(例如某个怪物的大小,每一关怪物数量),想写死在代码里面,都放在一个头文件中。本人在config.h中定义如下:
static const int MON_SIZE = 10;
map<int, int> LEVEL_MON_NUM;
static void initConfig(){
LEVEL_MON_NUM[1……继续阅读 »
10年前 (2015-11-26) 1123浏览
0个赞
将一个10以内的数分解为正整数相加,输出全部情况。如5: 5=1+4 5=2+3 5=1+1+3 ……
本人的代码如下
#include <stdio.h>
char result[20];
int N = 0;
void solve(int c, int t, int l, int d)
{
int i = 1……继续阅读 »
10年前 (2015-11-26) 1065浏览
0个赞
“代码修改自身”为啥要加个引号呢?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <io.h>
#include <windows.h>
FILE *f;
……继续阅读 »
10年前 (2015-11-26) 1145浏览
0个赞
Class A(){
public:
A();
vituralvoid pick(int a = 1;){
printf(“Class A: %d”, a++);
}
};
Class B(){
public:
B();
Void pick(int a = 5;){
printf(“Class B: %d”, a*5);
}
}
Voidmain(){
A……继续阅读 »
10年前 (2015-11-26) 982浏览
0个赞
假设有整型指针数组
int *p[3];
有结构类型
struct n
{
int a;
int b;
int c;
};
然后本人用p[0]=&n.a为什么不行呢?编译器提示本人 表达式必须包含类类型 谁能帮本人详细解释一下,谢谢!
解决方案:20分
你需要有一个结构体对象,原因是你结构体中的变量是属于对象的,也就是说每个对象都有一份a、b、……继续阅读 »
10年前 (2015-11-26) 1142浏览
0个赞