pardon my previous pseudo code,
the following is actual code:
char[] aa = new char[6];
int i = 0;
while ( i < 6 )
{
aa[i] = (char)i;
++i;
}
On Jul 9, 1:26 am, Subrato Mukherjee <[email protected]>
wrote:
> Cannot implicitly convert from string to char is what I get. I had already
> tried that before. when I type cast the UInt64 to char it stores its ascii
> value rather than number value in string
>
> *char[] _strOutput = new char[10]; // declaration of char array*
> *UInt64 _numberToConvert, _nInputNumber;*
> *while()*
> *{*
> * _numberToConvert= _nInputNumber % baseForNumber;
> _strOutput[_counter] = (char)_numberToConvert; // this line needs to
> store the value which I need to retrieve later on and check
> _InputNumber = _nInputNumber / baseForNumber;
> _counter++;*
> *}*
>
>
>
> On Thu, Jul 8, 2010 at 12:50 PM, xzzy <[email protected]> wrote:
>
> > while ()
> > {
> > _strOutput[_counter] = _counter.ToString();
> > ++_counter;
> > }
>
> > On Jul 8, 10:38 am, S <[email protected]> wrote:
> > > Hello Everyone,
> > > I was wondering if anyone has any ideas on how
> > > to deal with a situation where I have to store int values in char
> > > array. So I want to store '7' in char array but every thing I have
> > > tried so far has resulted in no solution.
>
> > > If anyone has better idea I am all ears. I am attaching the following
> > > code for everyone's reference.
>
> > > _numberToConvert= _nInputNumber % baseForNumber;
> > > _strOutput[_counter] = _numberToConvert; // this line
> > > needs to store the value which I need to retrieve later on and check
> > > _nInputNumber = _nInputNumber / baseForNumber;
> > > _counter++;
>
> > > Anyone any ideas ?
>
> > > - S