[問題] 請問宣告順序問題
Hi, 有個問題想請問
現在有兩個檔, A跟B檔, B檔是被A檔include
現在有一個class叫test, 因為這個class本身設計有問題, 只能存在A檔裡.
但是在B檔內要能用到在A檔內宣告的test變數, 並instance它.
A檔 :
#include <test.h>
#include <B.h>
int main()
{
test* mq;
..........
}
B檔 :
void ...()
{
mq = new test( "ooxx" );
}
請問這該怎麼辦~?
這個有問題的class是boost library的message_queue, 剛好遇到這問題時看到
有人發了同樣問題的bug ticket.
請問除了boost library的message_queue外, 有其它在windows跟linux上較常用
的message_queue library嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.189.92.252
推
05/25 22:43, , 1F
05/25 22:43, 1F
→
05/26 00:21, , 2F
05/26 00:21, 2F
推
05/26 01:05, , 3F
05/26 01:05, 3F
→
05/26 01:06, , 4F
05/26 01:06, 4F
→
05/26 01:07, , 5F
05/26 01:07, 5F
推
05/26 10:35, , 6F
05/26 10:35, 6F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章