Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #70264

Re: I'm not able to find the error

From Manfred <invalid@add.invalid>
Newsgroups comp.lang.c++
Subject Re: I'm not able to find the error
Date 2019-12-05 01:42 +0100
Organization Aioe.org NNTP Server
Message-ID <qs9jpt$7ah$1@gioia.aioe.org> (permalink)
References <qs8ock$839$1@gioia.aioe.org> <qs90n8$1fld$1@gioia.aioe.org>

Show all headers | View raw


On 12/4/19 8:16 PM, Manfred wrote:
>>

Sorry, wrong line. Itis the /move/ assignment operator that should get a 
non-const reference.

>>      // Vector& operator= (const Vector& r)    // the copy assignment
>         Vector& operator= (Vector& r)    // the copy assignment
>>      {
>>          delete [] data;
>>
>>          sz = r.size();
>>          data = new int[sz];
>>
>>          for(size_t i=0; i < sz; i++)
>>              data[i] =  r.data[i];
>>
>>          return *this;
>>      }
>>
>>      Vector& operator= (const Vector&& r)    // the move assignment

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

I'm not able to find the error alexo <alelvb@inwind.it> - 2019-12-04 17:54 +0100
  Re: I'm not able to find the error Volker Wippel <Volker.Wippel@v2c2RemoveNoSpam.at> - 2019-12-04 18:40 +0100
  Re: I'm not able to find the error Daniel <danielaparker@gmail.com> - 2019-12-04 10:01 -0800
    Re: I'm not able to find the error Daniel <danielaparker@gmail.com> - 2019-12-04 10:06 -0800
  Re: I'm not able to find the error Manfred <noname@add.invalid> - 2019-12-04 20:16 +0100
    Re: I'm not able to find the error Manfred <invalid@add.invalid> - 2019-12-05 01:42 +0100
      Re: I'm not able to find the error alexo <alelvb@inwind.it> - 2019-12-05 03:45 +0100
        Re: I'm not able to find the error alexo <alelvb@inwind.it> - 2019-12-05 03:58 +0100
          Re: I'm not able to find the error Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2019-12-05 04:10 +0000
            Re: I'm not able to find the error alexo <alelvb@inwind.it> - 2019-12-05 05:45 +0100
          Re: I'm not able to find the error Manfred <noname@add.invalid> - 2019-12-05 17:29 +0100
  Re: I'm not able to find the error alexo <alelvb@inwind.it> - 2019-12-04 22:52 +0100
    Re: I'm not able to find the error Daniel <danielaparker@gmail.com> - 2019-12-04 16:47 -0800
      Re: I'm not able to find the error alexo <alelvb@inwind.it> - 2019-12-05 03:37 +0100

csiph-web