Assignment makes pointer without a cast

前端 未结 2 1129
星月不相逢
星月不相逢 2021-01-26 11:31

I am editing a quick sort code so that the values of low, high, and middle point to an array element instead of integers.

This is my code:

#include 

        
2条回答
  •  礼貌的吻别
    2021-01-26 11:52

    The problem is in this statement.

    middle = split(a, low, high);
    

    because middle is a pointer variable whereas split is a function which returns integer value not a pointer to an integer.

    You are assigning integer value to a pointer variable middle . You are not allowed to do that. :)

    May be this will help you.

提交回复
热议问题