Drawing a Checked Grid As a senior in Computer Science, have a long way to go towards improving myself. I'd appreciate any and all criticism.

Problem Set 

Write a program that can draw a scalable checkered grid (like a chessboard) to any dimension.

#include &lt;iostream&gt;
using std::cout;
using std::cin;


void printSmallSquares(int SquareSize, int width, bool cond) {
bool stars = cond;
    printf("%s", "\n*");
    for (int i = 0; i &lt; width; i++) {
        for (int i = 0; i &lt; SquareSize; i++)
        {
            printf("%s", (stars ? "*" : " "));  
        }
    stars = !stars;
}
printf("%s", "*");
}

int main() {
int Height = 8;
int Width = 16;
int SquareSize = 6;

for (int j = 0; j &lt; Height; j++) {
    for (int i = 0; i &lt; Width * SquareSize + 2; i++) {
        printf("%s", "*");
    }

    for (int i = 0; i &lt; SquareSize; i++) {
        (j % 2 == 0 ? printSmallSquares(SquareSize, Width, true) : printSmallSquares(SquareSize, Width, false));
    }
    printf("%s", "\n");
}
for (int i = 0; i &lt; Width * SquareSize + 2; i++) {
    printf("%s", "*");
}
cin &gt;&gt; Width;

}
There are some things to consider:


You already have using std::cout, however you use printf 

for (int i = 0; i &lt; Width * SquareSize + 2; i++) {
    std::cout &lt;&lt; "*";
} 

Edit: See that std::cout takes a std::string, so you should include that header.
C++ mainly works with std::string rather than plain char arrays. Now if you look at std::string there is this constructor string (size_t n, char c) So what you can do now is replace the loop by a constructor:

std::cout &lt;&lt; std::string(Width * SquareSize + 2, "*");

You are passing the result of a boolean comparison as a boolean:

for (int i = 0; i &lt; SquareSize; i++) {
    (j % 2 == 0 ? printSmallSquares(SquareSize, Width, true) : printSmallSquares(SquareSize, Width, false));
}


Just pass the comparison directly:

for (int i = 0; i &lt; SquareSize; i++) {
    printSmallSquares(SquareSize, Width, j % 2 == 0);
}

Obviously you should use a appropriate class for your task:

class DrawCheckedGrid {

    DrawCheckedGrid(const int heigth, const int width const int size)
        : Height(height)
        , Width(width)
        , SquareSize(size)
    {}
private:
    int Height;
    int Width;
    int SquareSize;
}


Now that you have a class, you can preallocate all you need

std::string stars = std::string(SquareSize, "*");
std::string spaces = std::string(SquareSize, " ");
std::string separator = std::string(Width * SquareSize + 2, "#") + "\n";


Also you can simply create some helper methods that draw the grid rather than plumbing everything into main():

void drawLines(bool starsFirst) const {
    for (int line = 0; line &lt; Width; ++line) {
        drawLine(starsFirst);
    }
    std::cout &lt;&lt; separator;
}

void drawLine(bool starsFirst) const {
    const int offset = starsFirst ? 0 : 1;
    for (int square= offset; square &lt; Width + offset; ++square) {
         std::cout &lt;&lt; (square % 2 == 0 ? stars : spaces);
    }
    std::cout &lt;&lt; "\n";
}

void drawGrid() const {
    std::cout &lt;&lt; separator;
    for (int i = 0; i &lt; Height; ++i) {
        drawLines(i%2 == 0);
    } 
}


See that I have created multiple small helpers that do one thing at at a time, rather than one big function.

class DrawCheckedGrid {
    DrawCheckedGrid(const int heigth, const int width const int size)
        : Height(height)
        , Width(width)
        , SquareSize(size)
    {        
        stars = std::string(SquareSize, "*");
        spaces = std::string(SquareSize, " ");
        separator = std::string(Width * SquareSize + 2, "#") + "\n";
    }

    void drawGrid() const {
        std::cout &lt;&lt; separator;
        for (int i = 0; i &lt; Height; ++i) {
            drawLines(i%2 == 0);
        } 
    }
private:

    void drawLines(bool starsFirst) const {
        for (int line = 0; line &lt; Width; ++line) {
            drawLine(starsFirst);
        }
        std::cout &lt;&lt; separator;
    }

    void drawLine(bool starsFirst) const {
        const int offset = starsFirst ? 0 : 1;
        for (int square= offset; square &lt; Width + offset; ++square) {
             std::cout &lt;&lt; (square % 2 == 0 ? stars : spaces);
        }
        std::cout &lt;&lt; "\n";
    }
    int Height;
    int Width;
    int SquareSize;
    std::string stars;
    std::string spaces;
    std::string separator;
}


Here you can also see that all internal functions are private, so we do not leak our internals. You can also add functions that allow you to change the parameters of the grid and pass something to drawGrid().