<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Fiddler's Blog</title>
	<atom:link href="http://fiddlerboy.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fiddlerboy.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 06 May 2009 16:51:25 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='fiddlerboy.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/6114ee164b2d1a4256f21f648d435459?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Fiddler's Blog</title>
		<link>http://fiddlerboy.wordpress.com</link>
	</image>
			<item>
		<title>Creating mods for OpenArena</title>
		<link>http://fiddlerboy.wordpress.com/2009/03/26/creating-mods-for-openarena/</link>
		<comments>http://fiddlerboy.wordpress.com/2009/03/26/creating-mods-for-openarena/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 20:49:03 +0000</pubDate>
		<dc:creator>Fiddler</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fiddlerboy.wordpress.com/?p=31</guid>
		<description><![CDATA[Using the Quake 3 source, we can also create mods for OpenArena, albeit with some modifications. Just compiling the source and installing a mod will give you a &#8216;Client/Server mismatch&#8217; error. So, follow the steps below to get your mod up and running :

Install OpenArena first (You can get it from the package manager on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=31&subd=fiddlerboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Using the Quake 3 source, we can also create mods for OpenArena, albeit with some modifications. Just compiling the source and installing a mod will give you a &#8216;Client/Server mismatch&#8217; error. So, follow the steps below to get your mod up and running :</p>
<ul>
<li>Install OpenArena first (You can get it from the package manager on most linux distributions)</li>
<li>Download the Quake 3 source from http://ioquake3.org/</li>
<li>Change BASENAME in ioquake3/code/qcommon/q_shared.h from &#8220;baseq3&#8243; to &#8220;baseoa&#8221;</li>
<li>Make other changes to code if you want</li>
<li>Make sure you have libsdl and libopenal</li>
<li>Compile using make</li>
<li>Navigate to the directory baseoa/ under ~/.openarena/ and create a directory vm/ under it</li>
<li>Copy ioquake3/build/release-linux-i386/baseq3/vm/qagame.qvm to baseoa/vm/</li>
<li>Run the game</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fiddlerboy.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fiddlerboy.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fiddlerboy.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fiddlerboy.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fiddlerboy.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fiddlerboy.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fiddlerboy.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fiddlerboy.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fiddlerboy.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fiddlerboy.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=31&subd=fiddlerboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fiddlerboy.wordpress.com/2009/03/26/creating-mods-for-openarena/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/732364b215a9a8c161e68d2015a78b57?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">Fiddler</media:title>
		</media:content>
	</item>
		<item>
		<title>C++ Cheat Codes</title>
		<link>http://fiddlerboy.wordpress.com/2008/12/02/stl-tips-tricks/</link>
		<comments>http://fiddlerboy.wordpress.com/2008/12/02/stl-tips-tricks/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 16:31:49 +0000</pubDate>
		<dc:creator>Fiddler</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[One Liner]]></category>
		<category><![CDATA[Shortcut]]></category>
		<category><![CDATA[STL]]></category>

		<guid isPermaLink="false">http://fiddlerboy.wordpress.com/?p=11</guid>
		<description><![CDATA[1. Finding out if a sequence is palindromic

bool isPalindrome(string s)
{
return equal( s.begin(), s.end(), s.rbegin() );
}

2. Eliminating consecutive duplicates in a sequence

void eliminate(string&#38; s)
{
s.resize( unique(s.begin(), s.end()) - s.begin() );
}

3. Counting the number of bits in an integer

int bitCount(int x)
{
return __builtin_popcount(x);
}

4. Finding the GCD of two integers

int gcd(int x, int y)
{
return __gcd(x, y);
}

5. Summing up all elements [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=11&subd=fiddlerboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>1. Finding out if a sequence is palindromic</strong></p>
<pre class="brush: cpp;">
bool isPalindrome(string s)
{
return equal( s.begin(), s.end(), s.rbegin() );
}
</pre>
<p><strong>2. Eliminating consecutive duplicates in a sequence</strong></p>
<pre class="brush: cpp;">
void eliminate(string&amp; s)
{
s.resize( unique(s.begin(), s.end()) - s.begin() );
}
</pre>
<p><strong>3. Counting the number of bits in an integer</strong></p>
<pre class="brush: cpp;">
int bitCount(int x)
{
return __builtin_popcount(x);
}
</pre>
<p><strong>4. Finding the GCD of two integers</strong></p>
<pre class="brush: cpp;">
int gcd(int x, int y)
{
return __gcd(x, y);
}
</pre>
<p><strong>5. Summing up all elements in a sequence</strong></p>
<pre class="brush: cpp;">
int sum(vector&lt;int&gt; v)
{
return accumulate(v.begin(), v.end(), 0);
}
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fiddlerboy.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fiddlerboy.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fiddlerboy.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fiddlerboy.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fiddlerboy.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fiddlerboy.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fiddlerboy.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fiddlerboy.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fiddlerboy.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fiddlerboy.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=11&subd=fiddlerboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fiddlerboy.wordpress.com/2008/12/02/stl-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/732364b215a9a8c161e68d2015a78b57?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">Fiddler</media:title>
		</media:content>
	</item>
		<item>
		<title>Dont reinvent the wheel. Use STL.</title>
		<link>http://fiddlerboy.wordpress.com/2008/05/10/dont-reinvent-the-wheel-use-stl/</link>
		<comments>http://fiddlerboy.wordpress.com/2008/05/10/dont-reinvent-the-wheel-use-stl/#comments</comments>
		<pubDate>Sat, 10 May 2008 10:37:08 +0000</pubDate>
		<dc:creator>Fiddler</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[STL]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://fiddlerboy.wordpress.com/?p=5</guid>
		<description><![CDATA[The STL (Standard Template Library) provides numerous classes and functions to simplify everyday programming tasks in C++. It is written into the C++ specification, so you needn&#8217;t worry that you may be using non-standard headers in case you do use it.
If you find yourself constantly needing stacks, queues, expandable arrays et al, the STL is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=5&subd=fiddlerboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The STL (Standard Template Library) provides numerous classes and functions to simplify everyday programming tasks in C++. It is written into the C++ specification, so you needn&#8217;t worry that you may be using non-standard headers in case you do use it.</p>
<p>If you find yourself constantly needing stacks, queues, expandable arrays et al, the STL is just for you.</p>
<p>In this article, i will demonstrate the basics of the <strong>vector</strong>, which is a great replacement for an array. A vector is, simplistically speaking, an expandable array. It grows and shrinks according to your requirements.</p>
<p>Lets assume you need to accept N integers from the user and need to display the list at the end (a very naive example, just for demonstration).</p>
<p>Since N is known only at runtime, you have a problem.</p>
<ul>
<li>How many locations on an array do you allocate?</li>
<li>Do you opt for the messier linked list implementation instead?</li>
</ul>
<p>One approach is to declare an array with a large number of elements.</p>
<p>This approach has two disadvantages:</p>
<ul>
<li>It wastes space.</li>
<li>It places an upper bound (which although may never be reached, is still a constraint) on the number of elements you can have in the array.</li>
</ul>
<p><strong>Without the STL, your code may look like this :</strong></p>
<pre class="brush: cpp;">
#include &lt;iostream&gt;
using namespace std;

int main()
{
   //Declare large array
   int arr[100];
   int size=0;

   //Get input from the user
   char reply = 'y';
   do
   {
      cout&lt;&lt;&quot;Enter number : &quot;;
      cin&gt;&gt;arr[size++];

      cout&lt;&lt;&quot;Any more (y/n)? &quot;;
      cin&gt;&gt;reply;
   } while(reply != 'n');

   //Display the list
   for(int i=0 ; i&lt;size ; i++)
      cout&lt;&lt;arr[i]&lt;&lt;&quot; &quot;;

   cout&lt;&lt;endl;
   return 0;
}
</pre>
<p><strong>With the STL :</strong></p>
<pre class="brush: cpp;">
#include &lt;iostream&gt;
#include &lt;vector&gt;
using namespace std;

int main()
{
   //Vector
   vector&lt;int&gt; V;

   //Get input from the user
   char reply = 'y';
   int num;
   do
   {
      cout&lt;&lt;&quot;Enter number : &quot;;
      cin&gt;&gt;num;

      //Add the number to the back of the vector
      V.push_back(num);   

      cout&lt;&lt;&quot;Any more (y/n)? &quot;;
      cin&gt;&gt;reply;
   } while(reply != 'n');

   //Display the list
   //Notice that the vector knows its own size
   for(int i=0 ; i&lt;V.size() ; i++)
      cout&lt;&lt;V[i]&lt;&lt;&quot; &quot;;

   cout&lt;&lt;endl;
   return 0;
}
</pre>
<p>Line 8 creates the vector. The datatype is specified within &lt;&gt;. So in case you want to create a vector that holds chars, then you would type</p>
<p>vector&lt;char&gt; V;</p>
<p>The number of elements in the vector can be found using the size() function. This simplifies things a lot. You no longer have to maintain and update separate variable that indicates the size.</p>
<p>Accessing an element in a vector can be done similar to the way in which you would access an element in an array.</p>
<p>There is a more efficient way to iterate through the vector, but for all practical purposes this will do.</p>
<p><strong>Good reference :</strong><br />
<a href="http://www.cplusplus.com/reference/stl/vector/">http://www.cplusplus.com/reference/stl/vector/</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fiddlerboy.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fiddlerboy.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fiddlerboy.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fiddlerboy.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fiddlerboy.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fiddlerboy.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fiddlerboy.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fiddlerboy.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fiddlerboy.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fiddlerboy.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fiddlerboy.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fiddlerboy.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=5&subd=fiddlerboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fiddlerboy.wordpress.com/2008/05/10/dont-reinvent-the-wheel-use-stl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/732364b215a9a8c161e68d2015a78b57?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">Fiddler</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting over Turbo C++ 3.0 and moving on</title>
		<link>http://fiddlerboy.wordpress.com/2008/05/08/getting-over-turbo-c-30-and-moving-on/</link>
		<comments>http://fiddlerboy.wordpress.com/2008/05/08/getting-over-turbo-c-30-and-moving-on/#comments</comments>
		<pubDate>Thu, 08 May 2008 18:06:24 +0000</pubDate>
		<dc:creator>Fiddler</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Turbo C++]]></category>

		<guid isPermaLink="false">http://fiddlerboy.wordpress.com/?p=4</guid>
		<description><![CDATA[I can&#8217;t understand this craze for an antiquated compiler which, although, was a great product during its time, is not really a great platform to work on now.
So, if you still use Turbo C++, here are a few reasons to move on.
1. It follows an older C++ standard
Ever wondered why the following program (the ubiquitous [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=4&subd=fiddlerboy&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I can&#8217;t understand this craze for an antiquated compiler which, although, was a great product during its time, is not really a great platform to work on now.</p>
<p>So, if you still use Turbo C++, here are a few reasons to move on.</p>
<p><strong>1. It follows an older C++ standard</strong></p>
<p>Ever wondered why the following program (the ubiquitous &#8216;Hello World&#8217; in C++) does not compile on Turbo C++?</p>
<pre class="brush: cpp;">
#include &lt;iostream&gt;
using namespace std;

int main()
{
   cout&lt;&lt;&quot;Hello World&quot;;
   return 0;
}
</pre>
<p>The reason is that Turbo C++ requires you to use the older<br />
#include &lt;iostream.h&gt; declaration.</p>
<p>This is just a trivial menace. You cannot use template functions, there is no exception handling, no STL&#8230;&#8230; must i go on?</p>
<p><strong>2. It forces you to use non-standard headers and functions</strong></p>
<p>The first thing that people say when they move onto another compiler is, &#8220;Hey, where did conio.h go?&#8221;. Thats because you&#8217;re forced to use getch() at the end of any console program written in Turbo C++ (you wont see the output if you dont).</p>
<p>So, the moment you step outside the Turbo C++ world, you feel lost without your friends getch(), gotoxy() and clrscr().</p>
<p><strong>3. The DOS mode editor just doesn&#8217;t cut it anymore<br />
</strong></p>
<p>Agreed, the syntax highlighting is tidy. But thats all there is to compliment.</p>
<p>You cant change the font. The scrollbars are not convenient to use either.</p>
<p><span style="font-size:medium;"><strong>Some alternatives:</strong></span></p>
<p><strong><strong><strong>1. Dev C++ :</strong> </strong></strong>This is a great IDE thats free to download and use.<br />
<a href="http://www.bloodshed.net/devcpp.html">http://www.bloodshed.net/devcpp.html</a></p>
<p><strong><strong><strong>2. Code::Blocks :</strong> </strong></strong>My personal favorite. Has a great code completion feature, and you can configure it to work with any compiler.<br />
<a href="http://www.codeblocks.org/">http://www.codeblocks.org/</a></p>
<p><strong><strong><strong>3. Visual C++ 2008 express :</strong> </strong></strong>Free to download and use again, but a little heavyweight.<br />
<a href="http://www.microsoft.com/express/vc/">http://www.microsoft.com/express/vc/</a></p>
<p><strong><strong><strong>4. Dump all the IDEs. Just switch to linux, use vim and g++ from the commandline :<br />
</strong></strong></strong>You will end up doing this someday. Its the purest way to code, and gives you total control.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fiddlerboy.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fiddlerboy.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fiddlerboy.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fiddlerboy.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fiddlerboy.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fiddlerboy.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fiddlerboy.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fiddlerboy.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fiddlerboy.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fiddlerboy.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fiddlerboy.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fiddlerboy.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fiddlerboy.wordpress.com&blog=3660322&post=4&subd=fiddlerboy&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://fiddlerboy.wordpress.com/2008/05/08/getting-over-turbo-c-30-and-moving-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/732364b215a9a8c161e68d2015a78b57?s=96&#38;d=http%3A%2F%2Fa.wordpress.com%2Fi%2Fmu.gif&#38;r=G" medium="image">
			<media:title type="html">Fiddler</media:title>
		</media:content>
	</item>
	</channel>
</rss>