I am trying to make a reference program that you can use to access any element of the periodic table based on its name, symbol, atomic number, or atomic mass. It is more than one file, and I need a way to return to main if the user wants to. How can I do that without actually making a function call to main()? all i want to do is make the program restart from the very beginning.
Rickay -5 Junior Poster in Training
Recommended Answers
Jump to PostI am using headers to include all of the functions, but I cannot wrap a loop around an entire program that is contained in more than one file. But I figured it out, I made a duplicate function called main1() and included the same syntax as that in main(), and …
Jump to PostHow many times do you want to be able to search? Once per program or is supposed to keep asking you till you quit?
A plain old loop will work just fine here. You don't even need any functions beyond main besides the functions that look up the elements.
…
All 6 Replies
dylank 0 Junior Poster in Training
Rickay -5 Junior Poster in Training
VernonDozier 2,218 Posting Expert Featured Poster
Rickay -5 Junior Poster in Training
VernonDozier 2,218 Posting Expert Featured Poster
dylank 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.