Re: It don't mean a thing, if you aint got that string! [message #421113 is a reply to message #421105] |
Sun, 28 February 2010 10:41 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma:
|
General (3 Stars) |
|
|
danpaul88 wrote on Sun, 28 February 2010 10:23 | if((strd.c_str())[0] == '&'){
Perhaps? (NB: I have not tried to compile that, but it *should* work in theory... the brackets around the strd.c_str() may or may not be required depending on the other of precedence.)
Basically you should get the underlying c_str and then get the first index of THAT array instead.
|
Cheers Dan, I did try: strd.at(0).c_str() which was my attempt at trying what you just posted, but it's obviously invalid. I'm at work so cannot try what you just wrote, but will give it a go when I get in.
|
|
|