C Passing an int in a function?

后端 未结 2 1478
感情败类
感情败类 2021-01-29 14:54

I am getting incorrect results when passing a int in a function:

int recruit(int var1, int re_unit, char *char_buffer, int var2) {
 int run = 1;
 int int_buffer          


        
2条回答
  •  无人及你
    2021-01-29 15:39

    Please change this statement int recruit(int lvl, int re_unit, char *char_buffer, int u_lvl, int lvl2) to int recruit(int lvl, int re_unit, char *char_buffer, int lvl, int lvl2). You are observing an incorrect value due to uninitialized variables.

提交回复
热议问题