A
A
Alexander2020-05-30 09:01:57
C++ / C#
Alexander, 2020-05-30 09:01:57

Why is there a cast in this place?

There is such a record

int a[][3] = {{1, 2, 3},{4, 5, 6}};
  int *b = (int*)a;

Why in the second line (int*)? As I understood this cast. But the letter "a" itself is a pointer. Why bring?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2020-05-30
@Shemapp

Then that a is int (*)[3], ab is int*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question