#any way to not use int main() as a redefinition?

19 messages · Page 1 of 1 (latest)

zealous elbow
#

hi guys i need help how do i not use a redefintion of int main() because im creating a mystrey game project but the thing here is i dont know how to redefine int main() (basically not using int main() twice in different cpp files) if someone can help i will be glad thanks!

warm waveBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

sullen portal
#

You shouldn’t redefine main in the same project. It’s a special function

zealous elbow
#

should i just use int main() in one cpp file then?

#

well in one function

#

i meant sorry if you cant understand trying my best lol

inland fiber
#

why do you think you need to redefine main?

zealous elbow
#

here is what im talking about

sullen portal
#

Yea, if you copy paste your code it would give us more context but it should be in one cpp file and then you can include headers

inland fiber
#

main is the entry point of your program. it's the function the os will run once your program is loaded.

#

a program cannot have more than one main function.

#

that wouldn't make any sense.

zealous elbow
#

oh

#

ok thanks

zealous elbow
#

just a kinda beginner

#

i did c++ for 5-6 months

#

thats all i needed to know

#

thanks