Error with command line inputs, and how to implement it into a formal function parameter

I have a homework problem that requires a function to take three strings in an array and output their characters one by one to an output file. Kinda simple, but my professor wants the output file name to be inputted from a command line input. I've never done this before, and I suck.

I'm getting an error and I need help figuring it out. I'm still learning arrays, and I'm having a hard time with them, especially c-strings and all the rules around them.

Thank You for your time.


lab08b.cpp:33:5: error: no matching function for call to 'verticalWords'
    verticalWords(fileName, name[argc][100], sizeOfArray);
lab08b.cpp:20:8: note: candidate function not viable: no known conversion from
      '__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type' (aka 'char')
      to 'std::__cxx11::string *' (aka 'basic_string<char> *') for 2nd argument
string verticalWords(string x, string y[], int z);


#include <iostream>
#include <string>
#include <iomanip>
#include <cassert>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <cstring>

using namespace std;

string verticalWords(string x, string y[], int z);

int main(int argc, char* argv[])
    int sizeOfArray = 0;
    string name[] = {"hello", "abc", "bye"};
    string fileName = "";

    for (int j = 1; j < argc; j++)
        sizeOfArray = sizeOfArray + strlen(argv[j]);

    verticalWords(fileName, name[argc][100], sizeOfArray);

    return 0;


string verticalWords(string fileName, string stringArray[], int sizeOfArray)
    ofstream outData;;
    string currentString;

    for (int i = 0; i < sizeOfArray; i++)
        stringArray[i] = currentString;

        for (int x = 0; x < currentString.length(); x++)
            outData << << endl;

    }//for statement for finding characters