Click here to Skip to main content
15,793,547 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if (m_ser_1 == NULL) // c++ has no null
        // no match for ‘operator==’ (operand types are ‘QSerialPort’ and ‘long int’)
	    	MessageBoxRed("m_ser_1 == None. must have at least one board");

	    if (m_ser_2 == nullptr)
        // no match for ‘operator==’ (operand types are ‘QSerialPort’ and ‘std::nullptr_t’)
     	MessageBoxRed("m_ser_2 == None. may or may not have only one board");
	    if (m_ser_3 == null)
         // ‘null’ was not declared in this scope
	        MessageBoxRed("m_ser_3 == None. may or may not have only one board");

What I have tried:

i even tried \0 , /0 , '\0' , QVariant::f_null
Updated 28-Oct-21 10:43am

In C++ there is nullptr (see nullptr, the pointer literal -[^].
However if you reported the exact compiler message, m_ser_1 is NOT a pointer, so you can't check it against nullptr.
Share this answer
thank you CPallini, I was think of "m_ser_1 is NOT a pointer" as a pointer, and code was treating it as a pointer, but just goes to show how sloppy python can get. Found in latter code that it was not a pointer.
Share this answer
Richard Deeming 29-Oct-21 5:11am    
If you want to reply to a solution, click the "Have a Question or Comment?" button under that solution and post a comment.

Do not post your comment as another "solution".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900