尝试在VB中运行此简单的C程序代码时遇到这些错误。需要帮助纠正他们。

C2371 'CopySubString': redefinition;different basic types
这是代码:
// --------------------------------------------------------------------------------
// Name: CopySubString
// Abstract: Copy substring from source string to destination string
// --------------------------------------------------------------------------------
int CopySubString(char strDestination[], char strSource[], int intStartIndex, int intEndIndex)
{
    int intCount = 0;
    int intIndex = 0;

    for (intIndex = intStartIndex; intIndex <= intEndIndex; intIndex += 1)
    {
        strDestination[intCount] = strSource[intIndex];

        intCount = +1;
    }

    return strDestination[intCount];
}

最佳答案

我相信下面这行是有问题的:

intCount = +1;
如下更改,然后重试。
intCount += 1;

09-30 11:17