Author Topic: Help with redefinitions  (Read 6647 times)

Offline X1pit

  • Single posting newcomer
  • *
  • Posts: 4
  • I'm proud of my bad English ;)
Help with redefinitions
« on: September 14, 2011, 05:35:40 pm »
Hey Guys!
I'm really embarressed about my prob but i need help :D
You might imagie my program:
main.cpp is like "#include "file.c" [..mainloop stuff..]"
file.c is like "#include <somelibs> void f(void){}"
When file.c is added to the project it doesn't work because "redefinition of f". But when i don't add it to project it works. But it's simply p*ssing me off to open it all the time by hand.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Help with redefinitions
« Reply #1 on: September 14, 2011, 06:15:51 pm »
Have you tried to learn what #include "some file" really does?
I guess you haven't.
Go read it in a book and then fix your problem yourself.

p.s. most of the time we don't help beginners learn how to program, this is not a generic c/c++ programming forum
p.p.s. you've known that if you've read the rules...
p.p.p.s. if you've read the rules you've know about one magic link (to our FAQ), which solves most of the problems :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Help with redefinitions
« Reply #2 on: September 15, 2011, 12:53:27 pm »
Unrelated to C::B and therfore violating our forum rules.

Topic locked !