t*e
2 楼
版上有member可以讨论一下topic吗,我都想疯了,没有题目很难,想写个幽默的
更难。
更难。
n*d
3 楼
I have 3 files like this. the compiler does not allow ~PStash has "inline"
flag.
temp_inline.h
class PStash {
void** storage;
public:
PStash() : storage(0) {}
~PStash();
};
temp_inline.cpp
#include "temp_inline.h"
inline PStash::~PStash() {
delete []storage;
}
temp_inlinemain.cpp
#include "temp_inline.h"
int main() {
PStash intStash;
}
It is fine if all the code in one file. What is wrong?
flag.
temp_inline.h
class PStash {
void** storage;
public:
PStash() : storage(0) {}
~PStash();
};
temp_inline.cpp
#include "temp_inline.h"
inline PStash::~PStash() {
delete []storage;
}
temp_inlinemain.cpp
#include "temp_inline.h"
int main() {
PStash intStash;
}
It is fine if all the code in one file. What is wrong?
t*3
5 楼
你觉得TOASTERMASTER有用吗?我也在想考虑参加一个呢
j*r
6 楼
all inline functions should be in header files.
f*f
7 楼
真的倒是问题不大,就是不知道为什么这么贵,那个大头,我看$35顶天了,就等meilefu来
指导一下有什么名堂,为啥这么贵.
指导一下有什么名堂,为啥这么贵.
n*d
9 楼
Why does this one work?
C13_PStashmain.cpp
#include "C13_PStash.h"
int main() {
PStash intStash;
intStash.inflate(3);
}
C13_PStash.h
#ifndef PSTASH_H
#define PSTASH_H
class PStash {
void** storage;
public:
PStash() : storage(0) {}
~PStash();
void inflate(int increase);
int add(void* element);
};
#endif
C13_PStash.cpp
#include "C13_PStash.h"
#include
using namespace std;
PStash::~PStash() {
delete []storage;
}
inline void PStash::inflate(int increa
【在 j********r 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: all inline functions should be in header files.
C13_PStashmain.cpp
#include "C13_PStash.h"
int main() {
PStash intStash;
intStash.inflate(3);
}
C13_PStash.h
#ifndef PSTASH_H
#define PSTASH_H
class PStash {
void** storage;
public:
PStash() : storage(0) {}
~PStash();
void inflate(int increase);
int add(void* element);
};
#endif
C13_PStash.cpp
#include "C13_PStash.h"
#include
using namespace std;
PStash::~PStash() {
delete []storage;
}
inline void PStash::inflate(int increa
【在 j********r 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: all inline functions should be in header files.
f*f
14 楼
那个福建毫子,出价超过150的有5个人啊!!!
相关阅读
请教各位大牛,berkeley的online data science值得去读吗?PhD Openings in Data Science & ML & AI-Fall18/Spr19Re: 请教板上老司机 关于组和以后的发展方向转行马工有无可能牛逼恭喜华为, 又一次让国人沸腾!下一波是区块链吧请教一下关于各大公司是怎么做测试的uber撞死人的视频Python的threading能共享generator吗?Tf里面怎么选optimizer?CS 毕业工作两个月被雷,再找工作困难吗?dataframe和SQL最大区别是什么呢[bssd]Golang还不错马云: 阿里自建物流, 刘强东: 开始偷学京东了吧?WiFi发展不起来的原因有啥通过语义理解提取信息的轮子?关于LISP的长贴VS C++项目的Reference是干什么的?搞个pandas需要啥数学?DL:我怀疑不同计算力下看到的现实不一样