Expected expression before ']' token?

前端 未结 4 947
青春惊慌失措
青春惊慌失措 2021-01-26 15:43

I have the following line which sends the arguments args[] and length to a method called largest.

  printf(\"Largest is: %         


        
4条回答
  •  心在旅途
    2021-01-26 16:21

    You can't pass an array like that. You have to pass the pointer to the array (first item):

    printf("Largest is: %d \n", largest(args, length));
    

提交回复
热议问题