<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.programmingexamples.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FSTL%2FSet%2FSetCustomClass</id>
		<title>CPP/STL/Set/SetCustomClass - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FSTL%2FSet%2FSetCustomClass"/>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=CPP/STL/Set/SetCustomClass&amp;action=history"/>
		<updated>2026-05-02T11:02:01Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>http://www.programmingexamples.net/w/index.php?title=CPP/STL/Set/SetCustomClass&amp;diff=618&amp;oldid=prev</id>
		<title>Daviddoria: Created page with '==SetCustomClass.cpp== &lt;source lang=&quot;cpp&quot;&gt; #include &lt;iostream&gt; #include &lt;set&gt;  #include &quot;Height.h&quot;  int main(int argc, char* argv[]) {   std::set&lt;Height&gt; S;    for(unsigned int i…'</title>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=CPP/STL/Set/SetCustomClass&amp;diff=618&amp;oldid=prev"/>
				<updated>2011-01-30T14:24:29Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;==SetCustomClass.cpp== &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;iostream&amp;gt; #include &amp;lt;set&amp;gt;  #include &amp;quot;Height.h&amp;quot;  int main(int argc, char* argv[]) {   std::set&amp;lt;Height&amp;gt; S;    for(unsigned int i…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==SetCustomClass.cpp==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;Height.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char* argv[])&lt;br /&gt;
{&lt;br /&gt;
  std::set&amp;lt;Height&amp;gt; S;&lt;br /&gt;
&lt;br /&gt;
  for(unsigned int i = 0; i &amp;lt; 10; i++)&lt;br /&gt;
  {&lt;br /&gt;
    S.insert(Height(i));&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Height.h ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#ifndef HEIGHT_H&lt;br /&gt;
#define HEIGHT_H&lt;br /&gt;
&lt;br /&gt;
class Height&lt;br /&gt;
{&lt;br /&gt;
  double H;&lt;br /&gt;
&lt;br /&gt;
  public:&lt;br /&gt;
    Height() {}&lt;br /&gt;
    Height(const unsigned int value) {H = value;}&lt;br /&gt;
    double getH() const {return H;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
bool operator&amp;lt; (const Height &amp;amp;H1, const Height &amp;amp;H2)&lt;br /&gt;
{&lt;br /&gt;
  if(H1.getH() &amp;lt; H2.getH())&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    return false;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CMakeLists.txt ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
cmake_minimum_required(VERSION 2.6)&lt;br /&gt;
&lt;br /&gt;
Project(SetCustomClass)&lt;br /&gt;
&lt;br /&gt;
ADD_EXECUTABLE(SetCustomClass SetCustomClass.cpp)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	</feed>