In C, if I have two types of pointers:
typeB *q;
typeA *p; 
int the following, is it unnecessary to put an explicit cast (typeA  *)
1    p= q       is fine, no need to use p = (typeA  *)q;
2    define: void func(typeA *p){}
     call:  func(q);  is fine, no need to use func((typeA  *)q)
3    p=malloc(sizeof(typeA));   is fine, no need to use p=(typeA  *)malloc(sizeof(typeA))
besides, is C++ the same or not?
thanks!
 
     
    