Having trouble with duplicate from file

So I need to create a program that opens a text file and reads the content and then create an array. I also need to create an array that uses the same text file but looks for lines that begin with the same number. I don't know where to begin with looking for duplicates. I need to output the new array (the one without duplicates) into another file. Below is what I have so far.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
#include <algorithm>

using namespace std;
void createarray();

//Function for array creation "createarray"
void createarray ()
{
  string pirates[5];
                           // creates array to hold names
  short loop;
                            //short for loop for input
  short loop2;
                               //short for loop for output
  string line[100];
                                    //this will contain the data read from the file
  ifstream myfile ("input.txt");
                                        //opening the file.
  if (myfile.is_open())                     //if the file is open
  {
        while (! myfile.eof() )                 //while the end of file is NOT reached
        {
            getline (myfile,line[100]);

            cout << line[100] <<  endl;                //and output it
            int line [100];                                     //criteria for input loop (as array 0-5)

        }
  }
}

void checkdup ()
{

ifstream myfile.open("input.txt");



}


int main()
{
cout <<"Here is the raw data for the votes, these include any duplicates."<<endl;
createarray();
cout << "Here is the file without duplicates"<<endl;



}
My first thought was wrong, and I cannot use maps per Project requirement. I have just forgotten to delete the other thread.
Why delete the other thread? There are answers in it already, so even if you deleted your post, you would leave meaningless answers there. Why not simply update that one with a new post?

Spamming the forum with multiple threads wastes your time and ours, because you end up with different people trying to help you in different threads.
Akroncs, I think we may be working on the same type of project here. Have you gotten any farther along? I am literally right before what you have posted here. Thanks.
No, I can't seem to figure out what to do, if you get any further along please let me know.
Topic archived. No new replies allowed.