<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>phabion's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/417413/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user phabion.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 21 May 2013 07:25:35 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>Define a class, which implements arithmetic with arbitrary precision</title>
      <link />
      <description>&lt;p&gt;Posted a 'new message on the Visual C++ forum.&lt;/p&gt;Hi everyone!&lt;br /&gt;
I'm reading a book and doing some exercises in this book. One of them is: define a class, which implements arithmetic (+, -, /, *) with arbitrary precision. This is a new type with just some arithmetic operations. With type double we also can do some arithmetic but with a definite precision.&lt;br /&gt;
Well, to do arbitrary precision arithmetic in C++, I think we need to develop a class such as 'Big Float'. I find it hard to believe they'd expect a beginner like me to do this as it's really a job for a mathematical specialist. &lt;br /&gt;
&lt;pre class="sourcecode"&gt;#include "stdafx.h"
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;string&amp;gt;
#include &amp;lt;cstdio&amp;gt;
#include &amp;lt;sstream&amp;gt;
#include &amp;lt;iomanip&amp;gt;
using namespace std;

class Number{
private:
 string _numbers;
public:
 Number(){}
 Number(const string&amp;amp; num) : _numbers(num){}
 friend string ConvertToString(double value);
 void print();
 //add operator
 Number operator+(Number rhsNumber);
 
};
Number Number::operator+( Number rhsNumber)
{
    Number temp;
    temp._numbers =ConvertToString(atof(this-&amp;gt;_numbers.c_str())+atof(rhsNumber._numbers.c_str())); 
    return temp;
}
void Number::print()
{
    cout&amp;lt;&amp;lt;_numbers&amp;lt;&amp;lt;endl;
}
string ConvertToString(double value)
{
    std::stringstream ss;
    ss &amp;lt;&amp;lt; setprecision(15)&amp;lt;&amp;lt;value;
    return ss.str();
}
int _tmain(int argc, _TCHAR* argv[])
{
    Number a="1.21111111111111111111111111111111111112222";
    Number b="2.1111111";
    Number c=a+b;
    c.print();
    system("PAUSE");
    return 0;
}
&lt;/pre&gt;&lt;br /&gt;
The thing is: suppose I'm an user. So I can use a Number object with arbitrary length, after computing the result should be saved with the precision that I've gave the Number object (in this situation the length of result should be saved).&lt;br /&gt;
But in my program it depends on setprecision(int n). The user has no choice. and it's a pointless.&lt;br /&gt;</description>
      <pubDate>Mon, 27 Dec 2010 21:30:23 -0700</pubDate>
    </item>
    <item>
      <title>How to work with two forms in Visual C# Studio 2008</title>
      <link />
      <description>&lt;p&gt;Posted a 'new message on the C# forum.&lt;/p&gt;Hi everyone!&lt;br /&gt;
The problem is: I created Form1 (on Form1 we have a button) and Form2. When I click on Form1, the color of Form2 will be changed randomly; and when I click on the button, the visibility of Form2 will be changed inversely (this one I have done well!). And now when I click on Form2, the size of Form1 could be changed randomly (this one I've asking you help).&lt;br /&gt;
&lt;br /&gt;
This is my code for the first mission:&lt;br /&gt;
&lt;br /&gt;
namespace HowToCreatSecondForm&lt;br /&gt;
{&lt;br /&gt;
    public partial class Form1 : Form&lt;br /&gt;
    {&lt;br /&gt;
        Form2 f = new Form2();&lt;br /&gt;
        public Form1()&lt;br /&gt;
        {&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
        }&lt;br /&gt;
                  &lt;br /&gt;
        private void button1Click(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            f.Visible = !f.Visible;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        private void ChangeColorForm2(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            Random randonGen = new Random();&lt;br /&gt;
            Color randomColor = Color.FromArgb(randonGen.Next(255), randonGen.Next(255), randonGen.Next(255));&lt;br /&gt;
            f.BackColor = randomColor; &lt;br /&gt;
            f.Show();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
So please let me know ho to do it in Visual C# studio 2008.&lt;br /&gt;
Any help is appreciated. Thanks in advanced!&lt;br /&gt;</description>
      <pubDate>Sun, 25 Apr 2010 09:08:51 -0700</pubDate>
    </item>
  </channel>
</rss>