LearningMasteringAlgorithms-C icon indicating copy to clipboard operation
LearningMasteringAlgorithms-C copied to clipboard

在MSVC下部分代码提示报错。

Open duxingzhe opened this issue 8 years ago • 2 comments

pointer 原来的代码是: heap.cpp heap->tree = temp 改成 heap->tree = &temp;;//error:temp 这样才不会报错。

duxingzhe avatar Jun 13 '17 03:06 duxingzhe

这样修改的话在Mac上是不行的,不知道是不是因为cpp的问题,因为tree->temp 本来就是一个指向实际内容的指针的指针,所以用heap->tree = temp应该是对的

在MSVC上的报错是什么呢?

yourtion avatar Jun 14 '17 02:06 yourtion

报错为:a value of type "void *" cannot be assigned to an entity of type "void **". 可能是编译器的理解方式不同,暂时没有深入研究。

duxingzhe avatar Jun 15 '17 02:06 duxingzhe