PHP has a cast (which until then I did not know), called binary .
Example of Manual :
$binary = (binary)$string;
$binary = b"binary string";
According to the PHP Manual:
(binary) - convert to binary string
I saw t...
struct a{
int a;
int b;
};
struct b{
int a;
int b;
}
int main()
{
struct a *p;
struct b b;
p = (struct a *)b; // deste modo da erro
p = (struct a *)&b; ; deste modo o compilador não aponta erro;
}
Would you li...
struct a {
int a;
int b;
};
struct b {
int a;
int b;
};
struct a *ponteiroa;
struct b b;
b.b = 20;
ponteiroa = &b; //Isto não dá certo
ponteiroa = (struct a *)&b;
Why does this (struct a *)&b work? Why c...
I'm having trouble casting a class in a class, when I use the inherited class method it gives the following error:
"entity.Aula can not be cast to tableview.AulaTV"
Here is the exception described above.
AulaTV atv = (AulaTV) new Aul...
I know a little bit of java, but now I'm venturing into C #, but here's a question:
In Java we instantiate an ArrayList like this:
ArrayList<Tipo> nomeArray = new ArrayList<>();
We retrieved a value like this:
nomeArray.get(1)...
I have an exercise that says I have to create a foundation. This basis has two derivatives. I have to do a cast of the derived class (1) for the derived class (2) and the derived class (2) for the base class. How should I do an exercise like thi...