[RESOLVED] Code not working - help
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: [RESOLVED] Code not working - help

  1. #1
    Join Date
    Sep 2012
    Posts
    2

    [RESOLVED] Code not working - help

    The "assigns" in the following code is not working. I don't know if assigns is what i should be using. I need to retrieve characters from line1. The variables: last, xxpos, eqpos contain certain position numbers in string line1. Any help is much appreciated. Thanks.

    getline( reader , line1 ) ;
    last = line1.length() ;
    xxpos = line1.find( "x", 0 ) ;
    eqpos = line1.find( "=", 0 ) ;
    num1.assign( 0, line1.at(xxpos) - 1 ) ;
    numx.assign( line1.at(xxpos), line1.at(xxpos) ) ;
    num2.assign( line1.at(xxpos) + 1, line1.at(eqpos) - 1 ) ;
    numeq.assign( line1.at(eqpos), line1.at(eqpos) ) ;
    num3.assign( line1.at(eqpos) + 1, line1.at(last) - 1 ) ;

  2. #2
    Join Date
    Sep 2012
    Posts
    2

    Re: Code not working - help

    I managed to solve it.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center