P
Puppet_Sock
So, I'm madly coding away, and my fingers stutter, and I produce this.
(mfirstToken is a std::string object.)
if(m_firstToken.c_str()[0] == 'M' || m_firstToken.c_str().c_str()[0]
== 'T')
{
// ... other code here
}
And of course my compiler barfs over it. But what it tells me is
..c_str requires an object. Had to peer at that for like 20 minutes
to spot the stupid mistake. I should not drink and code.
Socks
(mfirstToken is a std::string object.)
if(m_firstToken.c_str()[0] == 'M' || m_firstToken.c_str().c_str()[0]
== 'T')
{
// ... other code here
}
And of course my compiler barfs over it. But what it tells me is
..c_str requires an object. Had to peer at that for like 20 minutes
to spot the stupid mistake. I should not drink and code.
Socks