c++ - Delete duplicates from an array of objects -


I have to remove the duplicate from an array of objects, but so far my algorithm gives me mistakes: < (* Album *) request for member 'writer') - & gt; Album :: songs',

The type of indicator type 'song *' (perhaps you use '- & gt;')?

Then this code is:

  Zero Album: deleteDuplicates () {songs * on, * end = songs + top - 1; (Current = songs + 1; song and lift; end; songs ++, current = song + 1) {while (current & lt; = end) {if (current-> gt; author == songs.author & amp; amp; current- & gt; title == * songs.tatal & amp; current-> years == * song year and current-> length == * songs) { * Current = * end -; } And {current ++; }}}}   

How to fix any thoughts?

The compiler error must be removed with the following code.

  If (current-> author == song-> author and current-> title == song-> title = ^^ ^^^ ; Current; & gt; year == songs-> year and current-> length == songs-> length) ^^^ ^^^    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -