| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Visual C++ Programming Ask questions about Windows programming with Visual C++ and help others by answering their questions. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HELP this is not going well
Here is my code. It is supposed to draw 2 triangles - one with asterisks and one with characters. At first one triangle built, now none of them do. Will somebody please explain this to me?
|
|
#2
|
|||
|
|||
|
Re: HELP this is not going well
Quote:
#include <iostream> using namespace std; void printTriangle(int); void drawBar(int,int); void drawBar(double,char); int main() { int size; cout << "This program draws a Triangle" << endl; cout << "\nEnter the triangle base size: "; cin >> size; printTriangle(size); } //main void printTriangle(int sz) { for(int i = 0; i <= sz; i++) { drawBar(i,sz); } cout << endl; for(double i = 0; i <= sz; i++) { cout << "Enter a character: "; cin >> sz; } drawBar(double, sym) cout << endl; } } void drawBar(double ss,char symbol) { for( double i = 0; i <= ss; i++) { cout << "symb"; } } // drawBar void drawBar(double ssz,char symb) { for(double i = 0; i < ssz; i++) { cout << "symb"; } }// drawBar |
|
#3
|
||||
|
||||
|
Re: HELP this is not going well
Code:
drawBar(i,sz); Code:
cout << "symb"; |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|