Question: I am unable to store the string into an array, when I output `b[c]` nothing appears whatsoever, how can I store it into an array? 

```
int main(int argc, char *argv[])
{
    string b[80000];
    int c=0;
    string s;
    ifstream file(argv[1]);

    while(file >> s) {
        b[c]=s;
        c++;
        cout<<b[c];
    }

    system("pause");
    return 0;
}

```

Answer: 
You're printing empty strings. Just move `cout << b[c];` before `c++;`

I'd suggest use `std::vector`, it will avoid unnecessary temporary variables and magic constants:

```
#include <iostream>
#include <vector>
#include <string>
#include <fstream>

int main(int argc, const char* argv[])
{
    std::ifstream fin(argv[1]);

    std::vector<std::string> v
    {
        std::istream_iterator<std::string>(fin),
        std::istream_iterator<std::string>()
    };

    for(const auto& elem: v)
        std::cout << elem << std::endl;

    return 0;
}

```

Don't forget also handle cases when file name isn't passed, or file doesn't exist.
This may work 

```
while(file >> s) {
            b[c]=s;
            cout<<b[c];
            c++;

        }

```