【c語言】unresolved external symbol "void __cdecl print(int * const,int)" (
阿新 • • 發佈:2019-01-02
前言:在寫折半排序的時候,出了一個錯誤,找了一下,終於發現問題了。
程式中我自定了函式,又引用了stdio.h檔案,所以一直保證錯誤
#include<stdio.h> #define N 10 /* 折半查詢: **/ void main(){ void print(int a[],int n); int a [N] = {1,2,3,4,5,6,7,8,9,10}; print(a,N); int m = 0,low = 0,high = N-1,mid = 0,k = -1; printf("輸入查詢的元素:"); scanf("%d",&m); while(low<=high){ mid = (low+high/2); if(m<a[mid]) high = mid-1; else if(m>a[mid]) low = mid+1; else{ k = mid; break; } } printf("元素下標為%d\n",k);//注意這塊 } void printf(int a[],int n){//將函式名修改成print() 就可以了 for(int i=0;i<n;i++){ if(i%5==0) printf("\n"); printf("%d\t",a[i]); } }
經過查詢找到問題所在,就在我自己定義的函式名printf()和呼叫函式系統的函式printf()重複的了。所以出現這個問題。
相關推薦
【c語言】unresolved external symbol "void __cdecl print(int * const,int)" (<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfema
前言:在寫折半排序的時候,出了一個錯誤,找了一下,終於發現問題了。 程式中我自定了函式,又引用了stdio.h檔案,所以一直保證錯誤 #include<stdio.h> #define N 10 /* 折半查詢: **/ void main(){ v
【轉】MSVCRTD.lib(crtexew.obj) : error LNK2019: 無法解析的外部符號 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="adf2fac4c3e0ccc4c3ed9c
@2018-12-18 【小記】 vs-2013 編譯 cJSON code in git-hub 時遇見問題 error LNK2019,解決如下 【問題描述】MSVCRTD.lib(crtexew.obj) : error LNK2019: 無法解析的外部符號 [email pr
【C++】error LNK2019: 無法解析的外部符號 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a6f9f1cfc8ebc7cfc8e69790">[email protected
原因:c語言執行時找不到適當的程式入口函式 解決:對於控制檯應用程式 1.選單中選擇 Project->Properties, 彈出Property Pages視窗 2.在左邊欄中依次選擇:Configuration Properties->C/C++->
【forever1dreamsxx--NLP】日子在指尖悄悄流淌,不覺間卻沉積出暗香陣陣。一個普通的數學系本科生,熱愛數學,熱愛自然語言處理,從事自然語言處理相關工作。郵箱:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data
日子在指尖悄悄流淌,不覺間卻沉積出暗香陣陣。一個普通的數學系本科生,熱愛數學,熱愛自然語言處理,從事自然語言處理相關工作。郵箱:[email protected],希望能夠不吝交流。...
unresolved external symbol <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="045b5b5b63687170477661657061536d6a606b73536d706c41
unresolved external symbol [email protected] unresolved external symbol [email protected] 1.將開發庫中的.h檔案拷貝到Visual C++ 6.0的Incl
編譯出錯:fatal error C1001: INTERNAL COMPILER ERROR 和 連結出錯 unresolved external symbol <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfem
1.fatal error C1001: INTERNAL COMPILER ERROR 最近在編譯一個VC6.0工程(開發環境:win2000+VS6.0+Sp6),在加入預編譯頭後出現了下面的編譯錯誤提示: c:/program files/microsoft visua
【原創】叢集搭建報“Error unable to connect to nodes ['<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="96e4f7f4f4ffe2d6e4fbe7bbf8a7
在rabbitmq叢集搭建時,將rmq-n2和rmq-n3兩節點加入rmq-n1時,報如下錯: 解決辦法: rabbitmq叢集是基於erlang叢集的,而erlang叢集中各節點間的通訊是通過4369埠和25672埠來進行通訊的, 所以:防火牆開啟4369埠和25672埠&nbs
【Spring】@<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b0824253f392427272e390b192e3a3e2e383f062a3b3b22252c">[email pr
一 淺顯的感性理解 向瀏覽器宣告 @Controller 其作用簡單來說就是對瀏覽器宣告,此類為控制器類 @ResponseBody 作用在方法上,表明此函式返回的內容直接寫入HTTP Response物件 @RestController 是@ResponseBo
【轉載】解決方案:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2f48465b6f48465b475a4d014c4042">[email protected]a>出現Permissi
遇到的問題 今天心血來潮,想將intellij上的專案程式碼放到GitHub上管理。 在進行新增遠端庫的時候,出現了:[email protected]出現Permission denied (publickey) 原因是 ./ssh目錄預設在C:\Users\VULCAN\.ssh,而我
【Shell】linux bash Shell特殊變數:Shell $0, $#, $*, <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4f6b0f">[email protected]<
在linux下配置shell引數說明 前面已經講到,變數名只能包含數字、字母和下劃線,因為某些包含其他字元的變數有特殊含義,這樣的變數被稱為特殊變數。 例如,$ 表示當前Shell程序的ID,即pid,看下面的程式碼: $echo $$ 執行結果 29949
【逆風的方向 更適合飛翔】郵箱:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="80f3f2b1b9b9b3b0b8b2b9c0b1b6b3aee3efed">[email protected
專欄達人 授予成功建立個人部落格專欄
【<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ee8787868b9c81aeadbdaaa0">[email protected]a>】專注於資料庫與資訊檢索技術
###[email protected]### ① 本部落格中文章,除轉載外,均為作者本人原創。請轉載時,尊重個人勞動,註明原始出處 ② 內容主要涉及資料庫相關理論技術、雲端計算及軟體架構專案管理 同時我也是Sybase, SQLAnywhereStudio, PostgreSQ
【劉本龍的專欄】個人郵箱:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7d4e4d45444d4d454f4d4c3d0c0c531e121053">[email protected]
java高階工程師,5年工作經驗,一直專注於java領域的學習研究。 對java分散式高併發等有深入研究. 曾就職於 京東、網易 等公司. 聯絡方式:3089008201 技術交流QQ群:684457529
【Spring】Spring高階話題-計劃任務<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a68be6e3c8c7c4cac3f5c5cec3c2d3cacfc8c1">[email pr
進行本示例的演示,需要先配置好Maven和spring哦、 見: http://blog.csdn.net/qq_26525215/article/details/53010442 分析 要實現計劃任務,首先通過在配置類註解@EnableScheduling來開
【Spring】定時任務詳解例項<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="92bfd2c1f1faf7f6e7fef7f6">[email protected]a>
最近在做專案,時間比較緊張,也有比較久沒寫部落格了。 現在專案的Redis快取需要用到定時任務,就學習了一下Spring 的@Scheduled註解。使用起來很簡單。 這個例子是建立在之前我的一篇部落格的例項上面的。 也就是架好了SSM框架。 SSM
【linux備忘筆記】Linux root 從bash-3.2回到<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8af8e5e5fecae6e5e9ebe6e2e5f9fe">[email
1.進入目錄 cd /etc/skel 2.顯示隱藏檔案 ls -a .bash_logout .bash_profile .bashrc 拷貝這些隱藏檔案到/home 接
【<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a8dfc9c6cfd1cddcc9c7e8c4c1c6ddd0">[email protected]a>_u1604:~$】最好的學習資
{ "job": "Currently in private enterprises engaged in PHP, Java, Android programming.", "work from date": "2014-08-21 09:00 ", "bo
【學峰的學習筆記】歡迎交流!郵箱是<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="81f8e0efe6e2e9e0eeb0b8b9b6b1b5b0b5c1b0b7b2afe2eeec">[email
歡迎交流!郵箱是[email protected] 所有的部落格的pdf檔案版本都在網盤中可以下載: http://yunpan.cn/cdnAh7bcZjTgk 訪問密碼 d34f...
【Spring】Spring高階話題<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="012c41446f60636d64">[email protected]a>***註解的工作原理
@EnableAspectJAutoProxy @EnableAspectJAutoProxy註解 啟用Aspect自動代理 <aop:aspectj-autoproxy/> 開啟對AspectJ自動代理的支援。 在用到AOP的
【問題解決】<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5102021c7c110523303f22303225383e3f303d">[email protected]a>註解事務無
Spring SpringMVC MyBatis框架中[email protected]註解事務無效解決方法 SpringMVC-Spring-MyBatis框架 資料庫:SQL SERVER 2008 以前都是用的MySQL資料庫,沒有