Complete newbie here, with a quick question. I cant switch back and forth between "void FirstStage()" and "void CClient()". Any help would be greatly appreciated!!!
What everyone has failed to notice and I will say this to the best of what I know.
Your code says it is a C program, but the include files say different.
"<fstream>" is a C++ header file for working with file streams and files. It has no knowledge of the C "printf" function. For a C program you need the header file "<stdio.h>" or for a C++ compiler "<cstdio>".
Lines 7 and 15 are very nice prototypes and do not belong there. You do not proceed a function call with a return type.
The prototypes do need to go before the function definitions especially since "FirstStage" calls "CClient" and "CClient" is not compiled before "FirstStage".
After that refer back to what MikeyBoy said and jonnin's suggestion would keep the stack from filling up, but it is still an endless loop with no way out.