是否有可能在c程序中有两个主要功能? [英] Is it possible to have two main functions in a c program?
问题描述
并且,是否可以从另一个主要的
函数调用一个主函数?
谢谢大家。
mike-yue写道:
和,是否可以从另一个主要调用一个主函数
功能?
谢谢你们。
一般情况下,你不能在C
(或其他任何语言)中使用两个相同名称的函数
如果你想的话
*程序如何识别它们具有相同名称的哪一个?
-
jacob navia
jacob at jacob point remcomp point fr
logiciels / informatique
http://www.cs.virginia.edu/~lcc-win32
我记得有些人说可以用宏来做或者
#define的东西,但我找不到页面再一次。
jacob navia< ja *** @ nospam.comwrites:
一般来说你可以在C中有两个具有相同名称的函数
(或其他任何语言)
如果你想到它
*程序如何识别哪个具有相同的名称?
对于想要向C ++方向扩展C的人来说,
对C ++特性一无所知。
-
大笔资金倾向于解除我可能遇到的任何顾忌。
- Stephan Wilms
and, Is it possible to call one main function from another main
function?
Thanks guys.
mike-yue wrote:and, Is it possible to call one main function from another main
function?
Thanks guys.In general you can''t have two functions with the same name in C
(or in any other language for that matter)
If you think about it
*HOW* would the program recognize which is which if they have the same name?
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
I remember some guy said that it is possible to do it with macro or
#define something, but I can''t find the page anymore.
jacob navia <ja***@nospam.comwrites:
In general you can''t have two functions with the same name in C
(or in any other language for that matter)
If you think about it
*HOW* would the program recognize which is which if they have the same name?For someone who wants to extend C in the direction of C++, you
are remarkably ignorant of C++ features.
--
"Large amounts of money tend to quench any scruples I might be having."
-- Stephan Wilms
这篇关于是否有可能在c程序中有两个主要功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!