R
Ryan J. Geyer
I have this block of code, that looks something like this.
-----
if( sessionFields->__ptr[0].name == "Representative" ) { //Do
Stuff
}
-----
The first part is an object, with an array as member data. That array
is full of objects, and those objects have "name" as member data.
Those "name" variables are all of type "char*". And that variable is
filled with the value "Representatives". The problem is, this
statement never evaluates to true, so my code never executes.
I've checked to be sure that "name" contains what I expect it to
contain by sending it to "cout", and it always displays
"Representative" just like I expect.
Am I missing some level of memory indirection here? Or am I simply
doing this wrong?
Any help would be useful. Thanks!
-----
if( sessionFields->__ptr[0].name == "Representative" ) { //Do
Stuff
}
-----
The first part is an object, with an array as member data. That array
is full of objects, and those objects have "name" as member data.
Those "name" variables are all of type "char*". And that variable is
filled with the value "Representatives". The problem is, this
statement never evaluates to true, so my code never executes.
I've checked to be sure that "name" contains what I expect it to
contain by sending it to "cout", and it always displays
"Representative" just like I expect.
Am I missing some level of memory indirection here? Or am I simply
doing this wrong?
Any help would be useful. Thanks!