What is wrong with my MakeBox program?
/// A program that gives the user the option to draw a box
/// DrawBox version 1.0
/// by the legendary Golden Bunny
#include <iostream>
#include <conio.h>
#include <conio.c>
#include <string>
#include <windows.h>
void DrawBox(float height, float width);
void DrawHeight(float height);
void DrawWidth(float width);
void main()
{
string name="";
float height, width;
cout << "Input the name of your box: ";
cin >> name;
cout << "Input the Height of the Box: ";
cin >> height;
cout << "Input the width of the Box: ";
cin >> width;
cout << "\nDrawing Box";
for (int i=0;i<=16;i++) {
Sleep(200);
cout << "."; }
clrscr();
DrawBox(height, width);
getch();
}
void DrawBox(float height, float width)
{
HANDLE output=GetStdHandle(STD_OUTPUT_HANDLE);
COORD cursor;
SetConsoleCursorPosition(output, cursor);
DrawHeight(height);
DrawWidth(width);
cursor.Y+=height;
DrawWidth(width);
getch();
}
void DrawWidth(float width)
{
HANDLE output=GetStdHandle(STD_OUTPUT_HANDLE);
COORD cursor;
SetConsoleCursorPosition(output, cursor);
for (int loop=0;loop<=width;loop++) {
cursor.Y=2; cursor.X=5; cout << "-"; cursor.X++; }
getch();
}
void DrawHeight(float height)
{
HANDLE output=GetStdHandle(STD_OUTPUT_HANDLE);
COORD cursor;
SetConsoleCursorPosition(output, cursor);
for (int loop2=0;loop2<=height;loop2++) {
cursor.Y=3; cursor.X=4; cout << "|"; cursor.Y++; }
getch();
}