討論串[問題] 全域變數的問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
我再a.cpp裡宣告了一個global. int top = 0;. 另外再b.cpp裡,我也宣告了一個global. int top = 0;. 結果編譯的時候跑出了重複定義的錯誤. 於是我把a.cpp裡的變數宣告成. static int top = 0;. 讓他只能存在於自己的cpp裡,就解決
(還有141個字)
內容預覽:
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) *[m. vc++ 6.0. 問題(Question): *[m. 請問我該如何把我的變數所RUN的值從main.c丟到sertrans.c裡. http://ppt.cc/aysZ. 謝謝各位. --. ※ 發
(還有68個字)
內容預覽:
兩段程式 :. #include<stdio.h>. #include<stdlib.h>. int main(). {. char str1[] = "This is a string";. char *p = str1;. char **pp;. *pp = p;. printf("p = %s
(還有430個字)
首頁
上一頁
1
下一頁
尾頁