線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:649
推到 Plurk!
推到 Facebook!

关于linker error的问题

尚未結案
newstargirl
一般會員


發表:2
回覆:2
積分:0
註冊:2003-06-12

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-06-25 14:53:01 IP:218.3.xxx.xxx 未訂閱
[Linker Error] Unresolved external 'operator >>(_STL::basic_istream >&, SparseMatrix&)' referenced from D:\MP3\ALL\SMATRIX.OBJ [Linker Error] Unresolved external 'operator >>(_STL::basic_istream >&, SparseMatrix&)' referenced from D:\MP3\ALL\SMATRIX.OBJ 是什么问题,怎么解决? 还有: template void SparseMatrix:: Transpose(SparseMatrix &b) const {// Return transpose of *this in b. // make sure b has enough space if (terms > b.MaxTerms) throw NoMem(); // set transpose characteristics b.cols = rows; b.rows = cols; b.terms = terms; // initialize to compute transpose int *ColSize, *RowNext; ColSize = new int[cols 1]; RowNext = new int[rows 1]; // find number of entries in each column of *this for (int i = 1; i <= cols; i ) // initialize ColSize[i] = 0; for (int i = 0; i < terms; i ) ColSize[a[i].col] ; // find the starting point of each row of b RowNext[1] = 0; for (int i = 2; i <= cols; i ) RowNext[i] = RowNext[i - 1] ColSize[i - 1]; // perform the transpose copying from *this to b for (int i = 0; i < terms; i ) { int j = RowNext[a[i].col] ; // position in b b.a[j].row = a[i].col; b.a[j].col = a[i].row; b.a[j].value = a[i].value; } } 中的RowNext[]和ColSize[]代表什么
Royce520
高階會員


發表:18
回覆:157
積分:100
註冊:2002-09-13

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-06-25 20:15:59 IP:163.28.xxx.xxx 未訂閱
newstargirl 你好,   你的第一個問題, 我想是你忘了加入SMATRIX.cpp 正確路徑...   請在 View->Project Manager 下面檢視這個檔案的設定.      第二個問題是, 因為這個類別SparseMatrix 儲存資料的特殊性   所造成的, ColSize 在以下程式片斷裡 會統計記錄該欄號下   有資料的列數(轉置後, 這個會變成欄數): for (int i = 0; i < terms; i++) ColSize[a[i].col]++;   而RowNext 在以下片段中則會算出 行轉列的關係的起始索引值: RowNext[1] = 0; for (int i = 2; i <= cols; i++) RowNext[i] = RowNext[i - 1] + ColSize[i - 1];    這樣或許很難說明... 用圖來說吧    *真實的事物最美, 簡單的道理最好, 我能體會的 太少*
------
不要忘記呼吸,不要忘記編程! ∩__∩
newstargirl
一般會員


發表:2
回覆:2
積分:0
註冊:2003-06-12

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-06-30 16:41:31 IP:218.3.xxx.xxx 未訂閱
谢谢Royce520 我看了后犹如提醐灌顶,你的解释一目了然,真心感谢
joen0000
一般會員


發表:47
回覆:47
積分:18
註冊:2004-11-07

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-11-07 00:49:11 IP:61.230.xxx.xxx 未訂閱
你的第一個問題, 我想是你忘了加入SMATRIX.cpp 正確路徑... 請在 View->Project Manager 下面檢視這個檔案的設定.    怎ㄇ加入smatrix.cpp阿ˋ 我是new hand 請大大幫忙解答
系統時間:2024-06-22 18:38:03
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!