小编hoh*_*aid的帖子

-C 中的 W 隐式函数声明

我不明白这是如何隐式的,我在每个函数中返回一个 int ,并且所有函数都在主函数之前。老实说,第一次看到这个,有人给我发了很长的代码来调试,其中有很多错误,但为什么这不起作用,我错过了什么

int findString(char matrix[ROW][COLUNM],char str1[],int length){
    int left,right,top,down,result;



    left=left2_right(matrix,str1,length);-THESE 4 CALLS GIVE THE WARNINGS
    right=rigth2_left(matrix,str1,length);
    top=top_bottom(matrix,str1,length);
    down=bottom_top(matrix,str1,length);

    if(left != -1 ){result=left;}
    if(right != -1 ){result=right;}
    if(top != -1 ){result=top;}
    if(down != -1 ){result=down;}

return result;
}
Run Code Online (Sandbox Code Playgroud)

这是其中一项功能

int left2_right(char matrix[ROW][COLUNM],char str1[],int length){

    int i = 0, j, counting = 0, wordcnt;
    //int length = computeLength(str1);   //returns legth of string   
    int index = -1;

    for (i = 0; i < ROW; i++)
    {
        for (j = 0; j < …
Run Code Online (Sandbox Code Playgroud)

c arrays declaration function

1
推荐指数
1
解决办法
1352
查看次数

标签 统计

arrays ×1

c ×1

declaration ×1

function ×1