For example I have following code:
void fourth()
{
struct s1
{
int *j;
};
struct s2
{
int k;
};
s1 *p1;
s2 *p3;
p1 = new s1;
p3 = new s2;
p3->k = 56;
*(p1->j) = p3->k;
}
I have a field of s1 structure which contains pointer to another field of s2 structure. Is it correct to write like this *(p1->j) = p3->k ?