News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Multiple Files in Single Project.

Started by hemu126, January 01, 2012, 06:04:14 AM

Previous topic - Next topic

hemu126

Can we create multiple C/C++ files in a single project in C::B? If Yes, how to run the file in the project?

I have created one project with 3 C++ Files, when i build the particular file i am getting Error: " Multiple definition of 'main' ".

I used breakpoint at main(), then also getting the same error.

Please help me how to run multiple files in a single project in C::B.

Thank You.




Jenna

Quote from: hemu126 on January 01, 2012, 06:04:14 AM
Can we create multiple C/C++ files in a single project in C::B? If Yes, how to run the file in the project?

I have created one project with 3 C++ Files, when i build the particular file i am getting Error: " Multiple definition of 'main' ".

I used breakpoint at main(), then also getting the same error.

Please help me how to run multiple files in a single project in C::B.

Thank You.

It's possible of course, otherwise we would not be able to develop C::B itself.

But you can not have multiple definitions of the main() function in one target (in the sources for one executable).

hemu126

Thanks for the reply.

I am new to C++ & C::B, can u please give me a example how to do it without multiple definitions of main() in one project.


Thank You.




Jenna

I just put you on my ignorelist for personal messages.

Please do not bother me or other users with general programming questions at all and don't ask questions that belong to the forum (and have been asked here in your case) in pm's, unless the user asked you to do so.

Be warned, you might get banned from the forum.