這是我的原型:C++,爲什麼編譯器不接受此功能
int WordCount(wstring u, int uLCID);
而且這是在cpp文件:
int WordCount(wstring u, int uLCID);
{
//accept anything for uLCID... meaning we don't process it
int b = 0;
int iCount=0;
for(;;)
{
int n = u.find(L" ",b);
if (n>-1)
{
iCount++;
}
else
{
break;
}
b=(n+1);
}
return iCount;
}
編譯器告訴我:
A declaration was expected.
我在做什麼錯了?
非常感謝。 – tmighty 2013-04-29 14:33:39