1. [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

new topic     » topic index » view message » categorize

2. Re: [OT] Visual C++ help

std::cout << output;

fred at jordah.freeserve.co.uk wrote:

>
>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!
>
>

-- 
Don't worry about people stealing your ideas. If your ideas are any good, you'll
have to ram them down people's throats.
-- Howard Aiken

new topic     » goto parent     » topic index » view message » categorize

3. Re: [OT] Visual C++ help

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!
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu