News:

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

Main Menu

Help with redefinitions

Started by X1pit, September 14, 2011, 05:35:40 PM

Previous topic - Next topic

X1pit

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.
Idea?

oBFusCATed

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!]

Jenna

Unrelated to C::B and therfore violating our forum rules.

Topic locked !