Error C2662 Cannot Convert
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the error c2662 cannot convert 'this' pointer from workings and policies of this site About Us Learn more about
Visual Studio Error C2662
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions c2662 cannot convert this pointer from const Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. error c2662 conversion loses qualifiers Join them; it only takes a minute: Sign up Compile Error C2662 [duplicate] up vote 1 down vote favorite This question already has an answer here: c++ error C2662 cannot convert 'this' pointer from 'const Type' to 'Type &' 3 answers I'm trying to pass an object as a reference to a function that accepts the object as a
C++ Error C2662
const however the compiler is throwing: error C2662: 'const int DataPacket::GetData(void)': cannot convert 'this' pointer from 'const DataPacket' to 'DataPacket &' IntelliSense says: the object has type qualifiers that are not compatible with the member function object type is: const DataPacket I made a test-cast of the code to demonstrate the issue: #include
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards cannot convert this pointer from const to & Events Community Magazine Forums Blogs Channel 9 Documentation APIs and error c2662 cannot convert this pointer from const to conversion loses qualifiers reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed.
Const Method
You’ll be auto redirected in 1 second. C/C++ Building Reference C/C++ Build Errors Compiler Errors C2600 Through C2699 Compiler Errors C2600 Through C2699 Compiler Error C2662 http://stackoverflow.com/questions/24815858/compile-error-c2662 Compiler Error C2662 Compiler Error C2662 Compiler Error C2600 Compiler Error C2601 Compiler Error C2602 Compiler Error C2603 Compiler Error C2605 Compiler Error C2611 Compiler Error C2612 Compiler Error C2613 Compiler Error C2614 Compiler Error C2616 Compiler Error C2617 Compiler Error C2619 Compiler Error C2624 Compiler Error C2626 Compiler Error C2627 https://msdn.microsoft.com/en-us/library/2s2d2tez.aspx Compiler Error C2628 Compiler Error C2630 Compiler Error C2632 Compiler Error C2633 Compiler Error C2634 Compiler Error C2635 Compiler Error C2636 Compiler Error C2637 Compiler Error C2638 Compiler Error C2640 Compiler Error C2645 Compiler Error C2646 Compiler Error C2647 Compiler Error C2648 Compiler Error C2649 Compiler Error C2650 Compiler Error C2651 Compiler Error C2652 Compiler Error C2653 Compiler Error C2654 Compiler Error C2655 Compiler Error C2656 Compiler Error C2657 Compiler Error C2658 Compiler Error C2659 Compiler Error C2660 Compiler Error C2661 Compiler Error C2662 Compiler Error C2663 Compiler Error C2664 Compiler Error C2665 Compiler Error C2666 Compiler Error C2667 Compiler Error C2668 Compiler Error C2669 Compiler Error C2670 Compiler Error C2671 Compiler Error C2673 Compiler Error C2674 Compiler Error C2675 Compiler Error C2676 Compiler Error C2677 Compiler Error C2678 Compiler Error C2679 Compiler Error C2680 Compiler Error C2681 Compiler Error C2682 Compiler Error C2683 Compiler Error C2687 Compiler Error C2688 Com
download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript). Home Qt https://forum.qt.io/topic/7774/solved-c2662-function-cannot-convert-this-pointer-from-type1-to-type2 Development General and Desktop