RobertSBoyle
Programmer
Hi there,
I am in a bit of stushi at the moment. I am an Oracle developer who has done a little pro*C in his time but have been asked to look at a c++ program that needs to have a bug removed as the guy who wrote it has left and the other c++ guy is on holiday (wish is were me ;oP)
Ok, problem is this, we have text coming in and we need to strip off any tab characters and whitespace. Easy enough except for this, the variable the text is in is like the following (the stripping code would go before this if clause):
if (StrCmp (abValue->m_szName, "BLAHBLAH"
== 0)
I am unsure what abValue->m_szName corresponds to. I have looked at MSDN and think it has something to do with classes? In which case I am totally lost as I have no OOP's experience at all. If it were in a simple string I could just loop through the string and remove all '\t' etc but I can't seem to get it to go into a string variable. When I try to copy in a strncpy I get the error:
error C2664: 'strncpy' : cannot convert parameter 1 from 'char' to 'char *'
Thanks in advance for any help.
Cheers
R.
I am in a bit of stushi at the moment. I am an Oracle developer who has done a little pro*C in his time but have been asked to look at a c++ program that needs to have a bug removed as the guy who wrote it has left and the other c++ guy is on holiday (wish is were me ;oP)
Ok, problem is this, we have text coming in and we need to strip off any tab characters and whitespace. Easy enough except for this, the variable the text is in is like the following (the stripping code would go before this if clause):
if (StrCmp (abValue->m_szName, "BLAHBLAH"
I am unsure what abValue->m_szName corresponds to. I have looked at MSDN and think it has something to do with classes? In which case I am totally lost as I have no OOP's experience at all. If it were in a simple string I could just loop through the string and remove all '\t' etc but I can't seem to get it to go into a string variable. When I try to copy in a strncpy I get the error:
error C2664: 'strncpy' : cannot convert parameter 1 from 'char' to 'char *'
Thanks in advance for any help.
Cheers
R.