I'm trying to write a program that uses the function drawCircleChar and the character should be 'X'.
However, I keep getting various error messages like undeclared symbol, etc.
Could anyone please help me out - I'm not sure what I'm doing wrong.
I know the character 'X' needs to be declared somewhere, I'm just not sure how to go about doing this.Code:#include <iostream> using namespace std; // Functions used..... void drawCircleChar(char symbol); // Draws a circle void drawTriangle(); // Draws a triangle void drawIntersect(); // Draws intersecting lines void drawBase(); // Draws a horizontal line int main () { // Draw a circle. drawCircleChar('X'); // Draw a triangle. drawTriangle(); // Draw intersecting lines. drawIntersect(); return 0; } // Draws a circle. void drawCircleChar(char X) { cout << " " << symbol << endl; cout << " " << symbol << " " << symbol << endl; cout << " " << symbol << " " << symbol << endl; } // end drawCircleChar // Draws a triangle. void drawTriangle() { drawIntersect(); drawBase(); } // end drawTriangle // Draws intersecting lines. void drawIntersect() { cout << " /\\ " << endl; cout << " / \\ " << endl; cout << " / \\" << endl; } // end drawIntersect // Draws horizontal line void drawBase() { cout << " ------" << endl; } // end drawBase
Thanks in advance.