Author Topic: Variables in external function call  (Read 73 times)

Offline ingh

  • Single posting newcomer
  • *
  • Posts: 1
Variables in external function call
« on: March 20, 2017, 04:03:28 pm »
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!!!!!!!!


Online stahta01

  • Lives here!
  • ****
  • Posts: 5647
    • My Best Post
Re: Variables in external function call
« Reply #1 on: March 20, 2017, 04:27:14 pm »
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.codeblocks.org/index.php/topic,9996.0.html

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org