[問題] 在cc檔抓節點座標

作者: ssddy (雨劍)   2010-12-15 09:18:39
查了網路上寫
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>'
請問要怎麼改才能正確抓到座標呢?@@
作者: abilitylife   2010-02-16 00:01:00
把index轉型成nsaddr_t試試

Links booklink

Contact Us: admin [ a t ] ucptt.com