第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

學(xué)習(xí)c++的新手遇到問題,求大神幫個(gè)忙

學(xué)習(xí)c++的新手遇到問題,求大神幫個(gè)忙

C++
嗶嗶one 2018-07-17 11:14:25
我代碼是這樣的: #include <iostream> using namespace std; int result(int, int); const int k = 2; struct  Point{     int x , y; }; int main() {     int z(0), b(50); Point a; cout << "輸入兩個(gè)整數(shù)(以空格區(qū)分):"; cin >> a.x >> a.y; z = (a.x + a.y) * k; z = result(z, b); cout << "計(jì)算結(jié)果如下:" << endl; cout << "((" << a.x  << " + " << a.y << " ) * " << k << ")+" << b          << "=" << z          << endl; return 0; } 但是報(bào)錯(cuò)了:Scanning dependencies of target cpp[ 50%] Building CXX object CMakeFiles/cpp.dir/main.cpp.o[100%] Linking CXX executable cppUndefined symbols for architecture x86_64:"result(int, int)", referenced from:_main in main.cpp.old: symbol(s) not found for architecture x86_64collect2: error: ld returned 1 exit statusmake[3]: *** [cpp] Error 1make[2]: *** [CMakeFiles/cpp.dir/all] Error 2make[1]: *** [CMakeFiles/cpp.dir/rule] Error 2make: *** [cpp] Error 2
查看完整描述

1 回答

?
DIEA

TA貢獻(xiàn)1820條經(jīng)驗(yàn) 獲得超2個(gè)贊

你 result 函數(shù)定義呢?只有聲明沒有定義,怎么調(diào)用


查看完整回答
反對 回復(fù) 2018-08-13
  • 1 回答
  • 0 關(guān)注
  • 617 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號