News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Variables in external function call

Started by ingh, March 20, 2017, 04:03:28 PM

Previous topic - Next topic

ingh

Hello,

I am writing a code in C, where I have a number of external functions. Now I came across something I struggle with:

I have file common.c where I define a number of global variables, that I then call in before main. If I call external functions
in main that require variables from common.c, I would have assumed that I am required to add them to the function call of this specific
external function. Suprisingly, I do not need to do that as Code::Blocks automatically uses the right variable within the external function,
even though I have not added it to the function call. How does this work? Since I consider this quite untransparent, I would like to deactivate
this. Can someone please let me know how to do this?

Thanks for the help!!!!!!!!


stahta01

Please read the rules; then, try to state an Code::Blocks related question.
NOTE: I have no idea on what you are trying to ask!

http://forums.next.codeblocks.org/index.php/topic,9996.0.html

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]