看板 Network_Sim 關於我們 聯絡資訊
查了網路上寫 double x = 0.0, y = 0.0, z = 0.0; //傳入三變數 Node *thisnode; // 宣告指標 thisnode = Node::get_node_by_address(index); ←這行make時出現error ((MobileNode *)thisnode)->getLoc(&x, &y, &z); 可是我把這幾行加入recv function時,make出現錯誤(如上標示)。 invalid conversion from 'char*<*>const char*,int>'to 'nsaddr_t>' initializing argument 1 of 'static Node* Node::get_node_by_address<nsaddr_t>' 請問要怎麼改才能正確抓到座標呢?@@ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.227.207
abilitylife:把index轉型成nsaddr_t試試 12/16 00:01