C++ Error: "base operand of '->' has non-pointer type 'datanode' {aka 'linknode'}" - Explanation and Solution
The error message "base operand of '->' has non-pointer type 'datanode' {aka 'linknode'}" indicates that you are trying to use the '->' operator on a non-pointer type. The '->' operator is used to access members of a structure or class through a pointer. It is typically used when you have a pointer to a structure or class and want to access a member variable or function. In your case, it seems that you are trying to use the '->' operator on a variable of type 'datanode', which is not a pointer type. To resolve this error, you should use the '.' operator instead of '->' to access the members of the 'datanode' variable. For example, if you have a variable 'node' of type 'datanode', you can access its members using the '.' operator like this: cpp node.memberVariable; node.memberFunction(); Make sure to review your code and ensure that you are using the correct operator for the type of variable you are working with.
' has non-pointer type 'datanode' {aka 'linknode'}" - Explanation and Solution" title="C++ Error: "base operand of '->' has non-pointer type 'datanode' {aka 'linknode'}" - Explanation and Solution" loading="lazy">
原文地址: https://www.cveoy.top/t/topic/pR4S 著作权归作者所有。请勿转载和采集!