-
September 6th, 2012, 10:45 PM
#1
[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 ) ;
-
September 7th, 2012, 12:45 AM
#2
Re: Code not working - help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|