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

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

The question has been closed for the following reason "Question is off-topic or not relevant. Only tangentially related to Wireshark." by multipleinterfaces 10 Apr '12, 07:30


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

permanent link

answered 10 Apr '12, 07:30

multipleinterfaces's gravatar image

multipleinte...
1.3k152340
accept rate: 12%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×158
×25

question asked: 10 Apr '12, 03:03

question was seen: 1,981 times

last updated: 10 Apr '12, 07:30

p​o​w​e​r​e​d by O​S​Q​A