CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Posts
    4

    Question Why doesn't my function start?

    for(i = 0; i < max; i++)
    {

    if (H1Subject == SubjectNumber [i])
    {
    *Candtotal = *Candtotal + SubjectTotal [i];
    SubjectUse [i] = 1;
    H1Yes = 1;
    SubjNumber = H1Subject;

    }
    }


    if (H1Subject > 0)
    {
    UpdateUseInd (&SubjNumber);
    }



    My UpdateUseInd (&SubjNumber) function does not want to start. The compiler is happy, no errors and the function is declared correctly. When I step through the program it does go into the if statement but it just do not want to go into the function. The SubjNumber is declared as an int. What can be my problem. It is in Builder 5.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,405

    Re: Why doesn't my function start?

    Well for the function to be called H1Subject must be greater than 0. Is it?

  3. #3
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Why doesn't my function start?

    Not enough information for us to help...
    What is UpdateUseInd?
    If "if (H1Subject > 0)" is indeed true, the function will be executed.
    Try a full rebuild, perhaps there are some out-of-sync debug files.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured