How do you find the same lines in the body and remove them?



  • The point is the next one. The programme produces a file about this content: (1)1,2,3,4 (2)5,2,3,4 (3)1,2, 8.4 (4)1,2,3,3 5)4.3,2.1 n). ♪ ♪ ♪ ♪ ♪ ♪

    I need to remove the repetitive elements that contain the same elements, but otherwise allowable, lines like 1 and 5. How do you do that?



  • I suggest that option (concept): count each line into class. Tfor which the operator is defined=(const T) and operator (const T). The objects of this class are in the set std: T: M♪ If the comparison operator is to recognize the elements of lines 1 and 5 (see the author ' s example) as the same, then the new element in the recruitment is to be found. M It won't add. After reading the entire original file, only unique class copies will remain in the kit. Tso you can just get them all out of the original file by rewriting it.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2