I want to make sniffer in C++.So can anybody help me out by providing codes??

Sure:

while  (1)
   std::cout << "Sniffing..\n";

But if you want a real answer, you should have a look at google
(first link for example...)

class dog {
  enum smells { poo, flower };
  smells nose ( object );
};

Instantiate the dog, then use the nose method to evaluate what a particular object smells like.

commented: Haha +5

Why cant people just respect forums for what they are - solving problems. Do you really think you can have people at your beck and call to do your homework for you.

commented: And...BANG! Another one who didn't read the forum rules!! This thread is already more than one year old. Let dead threads, don't ressurect them! -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.