Hey guys, first time here and I tried looking in other posts to see if I found what I needed.. But I didn't...
I am currently making a decoder, which consists of having a base text of: "the quick brown fox jumps over the lazy dog" and then having the user input a name file, opening the file and reading the first line. This line in the file will have the same number of chars as my base text, which will lead to knowing what is the new code... After that, the program must re-read the file with the remaining lines and it will be decoded with what I already have... And then create an output file with the decoded lines... Does it make any sense?

For example:
baseText.txt :
the quick brown fox jumps over the lazy dog

Decoder.txt :
gsv jfrxp yildm ulcvh qfnkh levi gsv ozab wlth
gsv jfrxp yildm ulc qfnkh levi z gsivv wlth
gsv jfrxp yildm ulc qfnkh levi gsv ozab wlt
gsv ozab wlt qfnkh levi gsv jfrxp yildm ulc
gsvjfrxp yildm ulc qfnkh levi gsvv ozab wlt

output.txt:
the quick brown foxes jumps over the lazy dogs
the quick brown fox jumps over a three dogs
the quick brown fox jumps over the lazy dog
the lazy dog jumps over the quick brown fox
thequick brown fox jumps over thee lazy dog


And what I have so far is
Code:
#include <iostream>
#include <fstream>
#include <string>


using namespace std;


int main(){
    ifstream textoBase;
    baseText.open("BaseText.txt");
    string base[50];
    while(baseText >> base[50])
    {
        cout << "Texto Base: " << base << endl;


    }
    cout <<endl;
    baseText.close();
    system("pause");
    return 0;


}
I tried that to see if I could see the base text, but it doesn't...
And I'm a newbie in this, so I don't know that much of programming...
Anything is appreciated, thanks!