This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Global Definitions

Hello!

What is the best method to declare some variables global ( more than one .C File should know it ) and still avoid multiple public definitions?

A Global Header File is definitely NOT the key to success ;-)

Thanks for your help!

Parents
  • "In my opinion things like this are bad for the readability of code."

    Things like what?

    What exactly is it that you find "not readable"?

    If you explain what you mean, people may be able to offer suggestions; if you don't, they can't - other than say, "It looks fine to me!"

    "Readability" is a subjective issue, so you need to explain what you mean by it!

    Personally, I don't do it the way Per does - but, without knowing what you don't like about that, how do I know if you might like "my" way any better?

Reply
  • "In my opinion things like this are bad for the readability of code."

    Things like what?

    What exactly is it that you find "not readable"?

    If you explain what you mean, people may be able to offer suggestions; if you don't, they can't - other than say, "It looks fine to me!"

    "Readability" is a subjective issue, so you need to explain what you mean by it!

    Personally, I don't do it the way Per does - but, without knowing what you don't like about that, how do I know if you might like "my" way any better?

Children
No data