How to decrease size of c++ source code?
<p>For example</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

int main() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);

  int n;
  cin &gt;&gt; n;
  for (int i = 0; i &lt; n; i++) {
    cout &lt;&lt; i;
  }

  return 0;
}
</code></pre>

<p>Decrease:</p>

<pre><code>#include &lt;fstream&gt;
int main() {
  std::ifstream y("input.txt");
  std::ofstream z("output.txt");

  int n, i = 0;
  y &gt;&gt; n;
  while(i &lt; n)
    z &lt;&lt; i++;

  exit(0);
}
</code></pre>

<p>What's about "fstream"?</p>

<pre><code>std::fstream y("input.txt"), z("output.txt")
</code></pre>

<p>It's amazing but output is not correct.)
"output.txt" isn't remaking. Output is writing from begin of file.</p>

<p>How to decrease code?</p>

<p>Just for fun.</p>
