Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » It don't mean a thing, if you aint got that string! (C++ help needed)
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 Go to previous messageGo to previous message
reborn is currently offline  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.



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: XCC Mixer?
Next Topic: Waterfall problems
Goto Forum:
  


Current Time: Mon Dec 30 05:14:39 MST 2024

Total time taken to generate the page: 0.01035 seconds