Hello I have a quick question. Since I'm not too familiar with C++ and I'm looking through some Code right now, I wondered what is happening in a function similar to this one:
#include "SomeInterface.h"
class SomeClass {
public:
...
void SomeFunction(...){
if (interface) { //What is asked here exactly?
/*do something*/
}
}
/*...*/
protected:
SomeInterface interface;
}
Since I'm coming from Java I wondered what is asked in the if-brackets. I'm used to only being able to put a lonely variable name in the if-brackets when the variable is of the type bool. But since here it is a custom interface-type I'm confused.
Thank you in advance for your answers.
Aucun commentaire:
Enregistrer un commentaire