這是我的錯誤:C語言編譯錯誤
error: static declaration of
doct
follows non-static declaration
error: previous declaration ofdoct
was here.
而且我的代碼是:
int doct(int*); /* <- Second error points here */
private int doct(int *a)
{
static int a=0; /* First error points here */
a++;
*a=a;
return 0;
}
有什麼建議?
void foo(void);
static void foo(void) {}
使在兩個static
匹配,或者通過從兩個移除或將其添加到以下兩者:
也許發佈一些源代碼會有幫助嗎? – Extrakun 2010-03-15 08:52:01
來源在哪裏?我不能多說這件事。 – 2010-03-15 08:52:35
建議:發佈一些代碼,以便我們知道錯誤所指的是什麼。這與我們問「結果是12,等式是什麼」沒有什麼不同。 – GManNickG 2010-03-15 08:54:42