Home c++ строка не найдена

строка не найдена




Why does this error occur? Why can’t do it?

class p {
  int x;
  int y;
Void Startat (P const ** p) {
  // Determine the start point
Void Endat (P const ** p) {
  // Determine the end point
Void Main () {
  P * P;
  Startat (& amp; p);
  Endat (& amp; p);

Answer 1, Authority 100%

So you can not do, because the types p * and p const * are different types. And you are trying to implicitly clarify the pointer to one type to the pointer to another type. And these two types are not related to the ratio of inheritance. And the type of pointer to which is trying to bring is not void * .

In general, the main reason is that p * and p const * are different types that do not have an implicit way to bring to each other.

Answer 2, Authority 100%

Error, apparently, at the time of execution: There is a pointer, but it indicates incomprehensible and, most likely, the memory is not limited to your process.

In addition, you usually write const p ** – you can not change the data on the sign.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions