Q:

How do I make a command line argument into a vector with each character as a different value?

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;
/*
void square(cLine, height){

}
*/
//void insertVector(vector<char> & cLine, )
int main(int argc, char *argv[]){
    if (argc != 5){
        cerr << "Incorrect number of arguments" << endl;
        return 1;
    }
    ofstream writeFile(argv[4]);
    if (!writeFile.good()){
        cerr << "Bad file, could not open" << endl;
        return 1;
    }
    int arrayLength = sizeof(argv[1]);
    vector<string> cLine;
    string cString(argv[1]);
    for(int i=0,i<arrayLength-2,++i){
        cLine.push_back(cString.substr(i,i+1));
    }
    cout << cLine << endl;
}

I'm trying to take an argument argv[1] and make it into a vector so I can easily splice it later on, I understand the argument is a c style char* array but I don't how to convert it into a vector where each index is exactly a character, yet is printable to console.

A:

This declaration
int arrayLength = sizeof(argv[1]);

does not make sense because sizeof(argv[1]) is equivalent to sizeof( char * ) and does not yield the number of characters in the argument. 
This statement
cout << cLine << endl;

also does not make sense because there is no overloaded operator << for the template class std::vector.
Moreover this for loop
for(int i=0,i<arrayLength-2,++i){

is syntactically incorrect.
What you need is the following
#include <cstring>

//…

std::vector<char> cLine( argv[1], argv[1] + std::strlen( argv[1] ) );
for ( const auto &c : cLine ) std::cout << c;
std::cout << '\n';

