本文介绍了函数声明:K&安培; R VS ANSI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是K&放大器之间的差异; R函数的声明和ANSI函数声明

What are the differences between a K&R function declaration and an ANSI function declaration?

推荐答案

K&放大器;:R语法是过时的,除非你有保持非常古老code你可以跳过它。

K&R syntax is obsolete, you can skip it unless you have to maintain very old code.

// K&R syntax
int foo(a, p)
    int a;
    char *p;
{
    return 0;
}

// ANSI syntax
int foo(int a, char *p)
{
    return 0;
}

这篇关于函数声明:K&安培; R VS ANSI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 12:41
查看更多