Debugging a call to a function from OnButton1 Event

I have a function that is called within an OnButton event.  When I place it in this function, it is skipped over in code and when I try to debug...but no errors are generated.  If I put the instructions of that function in the OnButton space, it works.  I can't figure out WHAT I'm doing wrong.  Does anyone have any ideas?

Here is the code:

void CUIMFCDlg::OnButton1()
{

                void Readcfgini();  //This is the call to the real function
                //This is the code for the function itself.  It returns data to my listbox
                //When I perform from here, it will actually execute the ScanDir Function and then return data to the list box.
      char **dirarray;
      char *scandir;
      scandir = "C:\\UI Code and Executable\\UIMFC\\UIMFC\\Debug\\programs";
      dirarray = 0;
      dirarray = ScanDir( scandir , 0);


      CString temp;
      for(int i=0;i<sizeof(dirarray);i++){
            temp.Format("%d", dirarray[i]);
            m_list.AddString(temp);}
}
//The called function
void Readcfgini()
{
      char **dirarray;
      char *scandir;
      scandir = "C:\\UI Code and Executable\\UIMFC\\UIMFC\\Debug\\programs";
      dirarray = 0;
      dirarray = ScanDir( scandir , 0);


      CString temp;
      for(int i=0;i<sizeof(dirarray);i++){
            temp.Format("%d",dirarray[i]);
            m_list.AddString(temp);
}
LVL 2
vivekparaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jimwassonCommented:
In OnButton1() you seem to have:

 void Readcfgini();  //This is the call to the real function

which is a declaration, not a call. Remove the "void" so you have

  Readcfgini();  //This is the call to the real function

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vivekparaAuthor Commented:
Why copying and pasting can be a bad thing.

I swear I looked at it a million times and didn't notice that.  =)

Thank You!
0
jimwassonCommented:
No problem. It happens to me a lot!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.