Re: [OT] Visual C++ help
- Posted by xerox_irs at lvcm.com
May 14, 2003
I think the problem is, that repeat,
string strclass::repeat(char ch,int rep)
{
string ret = "";
for (int c=0;c<rep;c++)
{
ret += ch;
}
return ret;
}
this is not the way to grow a string, definity not. The best way is to make
a macro to define a long string(255) of zeros, then use the repeat on it to
put in it what you want.
eg.
string a[255];
string strclass::repeat(char ch,int rep)
{
string ret = "";
for (int c=0;c<rep;c++)
{
ret[c]= ch;
}
return ret;
}
----- Original Message -----
From: <fred at jordah.freeserve.co.uk>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, May 12, 2003 9:27 PM
Subject: [OT] Visual C++ help
>
> Hi all,
> anyone willing to help me with this question?
>
http://logicsoft.pcplayground.com/modules.php?name=Forums&file=viewtopic&t=4
>
> Jordah
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>
|
Not Categorized, Please Help
|
|