It appears my program below is not reading in the files when I run it and type the name of the file. Could it be because it does not know where to look for them? Also my function to to return the amount of lines in the file only returns the memory address it appears. 

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

using namespace std;

```

function to return the amount of characters in the txt file that is input: 

```
int return_Characters(ifstream& in) 
{
    int characters = in.gcount();

    return characters;
}

```

function that is suppose to get the number of lines in the txt file and return that number as a double:

```
double return_lines(ifstream& in) 
{
    string name;
    double lines = 0;

    while(getline(in, name) ){
        int count = 0;
        lines = count++;
    }

    return lines;
}

```

main function:

```
int main() 
{
    string file_name;
    ifstream input_file;

    cout << "Please enter the name of your file" << endl;

```

do loop that reads in the file\_name string that user inputs and runs the functions to get the amount of characters and lines in the txt file input by the user:

```
    do {
        getline(cin, file_name);
        cout << "checking" << ' ' << file_name << endl;

        input_file.open(file_name);

        int count_characters = return_Characters(input_file);
        cout << "the number of characters is equal to " << count_characters << '\n';

        double count_lines = return_lines(input_file);
        cout << "the number of lines in the file is equal to" << return_lines << '\n';

        input_file.close();

    }while(!file_name.empty());

    cout << "there was an error oepning your file. The program will not exit" << endl;

    system("Pause");
    return 0;
}

```