|
-
April 5th, 2012, 04:26 AM
#8
Re: String.Find() not working ...
 Originally Posted by ChadReitsma
That's not pseudo man, it's exactly what I'm using... here let me post it:
Code:
//Extract the Angle data from the Buffer
//IMU Outputs:
//X:-0.36Y:0.29Z:-176.93!!!
std::string comData, gyroX, gyroY, gyroZ;
size_t xpos;
comData = szBuffer; //comData = X:-0.36Y:0.29Z:-176.93!!!
comData = comData.substr(0, comData.find_first_of("!") ); //Strips out the last !!! so we are left with comData = "X:-0.36Y:0.29Z:-176.93"
xpos = comData.find("X:");
look where I use find_first_of("!")... that works perfectly... so why doesn't find("X:") work on the string???
And where is the "trace" you mentioned in your previous post? 
And how did you find out that "that works perfectly"? Did you debug your code or not?
Last edited by VictorN; April 5th, 2012 at 04:29 AM.
Victor Nijegorodov
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
|