Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two pieces of code I wrote in C. I want to ember the 1st code inside the second where I said.

How can I do it without get errors?


....Problem solved.
Posted
Updated 1-Nov-14 3:35am
v3

1 solution

Just copy the main function from 1stcode to 2ndcode, rename it, for instance, check_file and then use it.
 
Share this answer
 
v2
Comments
CPallini 31-Oct-14 10:30am    
Post your code together with the exact error message.
CPallini 31-Oct-14 10:48am    
I suggested the opposite.
Please note your code would call recursively process.
CPallini 31-Oct-14 11:54am    
What's the purpose of the first code? Shouldn't it check the input file? Then make a function (not main function) with it and call it from the secodn code (you are doing the opposite).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900