This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

[closed] How can I compare two Gtkwidget pointers?

0

I want to compare values two Gtkwidget pointers for equality..... how can I do this?

I am trying to typecast it to int, but it isn't working...

Gtkwidget  *a;
Gtkwidget  *b;

if((int)a==(int)b) { //do something }

asked 10 Apr ‘12, 03:03

prashanth%20cm's gravatar image

prashanth cm
-1223
accept rate: 0%

closed 10 Apr ‘12, 07:30

multipleinterfaces's gravatar image

multipleinte…
1.3k152340


One Answer:

1

if(a==b) {} will work just fine. Comparison for strict equality is defined for pointer types.

answered 10 Apr '12, 07:30

multipleinterfaces's gravatar image

multipleinte...
1.3k152340
accept rate: 12%