Stack overflow when calling outside a button routine
Posted on 2004-10-11
I am a C programmer trying to add some C-style code to an MFC generated button-on routine. I need to copy some files from the button rouine so I've written a copy subroutine that I call several times from the button routine. When I make the call, though, I immediately get a stack overflow error. I wasn't sure where to put the copy routine so I just stuck it at the bottom of the file and then put a C-style delaration at the top of the file so my button routine could link to it. So basically I have,
UINT copy (char* source, char* destination);
// button routine
UINT copy source, destination)
// copy code
This could be something very stupid since this is the first MFC, or even C++ program for me, though I was encouraged when it compiled ok.
Thanks for any help.