Skip to main content
gamedev.net
🔒 Locked

Simple Compling Question

Started by DisKordCoder Oct 16, 2000 at 9:28 PM 0 replies 100+ views
Original Post
DisKordCoder
DisKordCoder
Ok, this has just been bugging me recently. Take this: i have one function in the first source file called Build(). And in the second source file i have one called Load(). Now, Build() calls Load(). But theres a problem, the Second source file is complied before the first, and so when the compiler sees this function call called Build(), and it thinks ''Where the hells this build then''? and so and error occurs. Normally i would place a function prototype into the header file for the second source file so that it knows that the function at least exists. But its painstaking, and i dont like it (for organisational purposes). Is there a way around it? I use Visual C++. Anyone? Thanks.
Quantum
Quantum
why dont you like making a header file?
just make a header file and prototype the function in it
its easy!

but if you really dont want to do it (which i dont recommend), then i think you can actually prototype the Load function in the Build functions source file.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.