Error C2371: redefinition; different basic types - why?

后端 未结 3 967
一个人的身影
一个人的身影 2021-01-04 03:20

I have the following code:

#include 
#include 

// helping
void sortint(int numbers[], int array_size)
{
  int i, j, temp;

           


        
3条回答
  •  离开以前
    2021-01-04 03:56

    You call eb from exera, before eb is declared. The compiler assumes it'll return int then finds an implementation that returns void further down the file.

    The most common fix is to declare your local functions at near top of your file

    void eb(int* ptr);
    // repeat for each other function which generates the same error
    

提交回复
热议问题