recursive on all control paths, function will cause runtime stack overflow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Iamrashmin
    New Member
    • Jul 2008
    • 1

    recursive on all control paths, function will cause runtime stack overflow

    I have converted VC6 project to .Net 2005 VC++.

    It gives me warning :
    warning C4717: 'CExcel::PrintL ine' : recursive on all control paths, function will cause runtime stack overflow

    void CExcel::PrintLi ne( LPCSTR pchText )
    {
    PrintLine( _bstr_t( pchText ) );
    }

    void CExcel::Print( LPCSTR pchText )
    {
    Print( _bstr_t( pchText ) );
    }

    Above functions are working fine VC 6.0.
    Can any one please help me resolve this issue?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Your PrintLine method does call itself ...
    P.S That's just a warning not an error.

    Comment

    • Curtis Rutland
      Recognized Expert Specialist
      • Apr 2008
      • 3264

      #3
      What is the purpose of that method? Both methods call themselves, with no non-recursive exit point that I can see.

      Comment

      Working...