I am writing a program that reads a line from a file, and outputs an ASCII shape based on the line in the file. For example, this "S @ 6" would mean a solid square of 6 @ by 6 @. My problem is I can read the lines from the file, but I'm not sure how to separate the characters in the file and use them as input. I have already written functions to make the shapes, I just need to pass the characters in the file as arguments.
int main()
{
    void drawSquare (char out_char, int rows, int width);
    void drawTriangle (char out_char, int rows);
    void drawRectangle (char out_char, int height, int width);
    char symbol;
    char letter;
    int fInt;
    string line;
    fstream myfile;
    myfile.open ("infile.dat");
    if (myfile.is_open())
    {
        while (getline (myfile,line))
        {
          cout << line << '\n';
        }
        myfile.close();
    }
  else cout << "Unable to open file";
  drawRectangle ('*', 5, 7);
}
 
    