hi im new to c++ and i trying to create a triangle series which looks a bit like this
*
**
***
****
*****
*
**
*
*
**
***
****
*****
here is my code so far and my error message
//Lyndsey Scott
//Tutorial 4
//Simple c++ program using functions
//16th October 2007
#include <iostream> // using the main library
using namespace std;
// Function declarations
char get_char_wanted () ;
int get_num_rows (int num_rows) ;
int get_num_colms (int num_colms) ;
void draw_line (char wanted_char) ;
int main ()
{ // indicates begining of the program
char wanted_char = get_char_wanted () ;
num_rows = get_num_rows ;
num_colms = get_num_colms ;
draw_line (wanted_char) ;
}
// Function definitions.
// Function to get character
char get_char_wanted ()
{
char wanted_char ;
{
cout << "input character wanted" << endl ;
cin >> wanted_char ;
return wanted_char ;
}
//Function to specify number of rows.
{
int get_num_rows () ;
{
int num_rows ;
cout << "enter number of rows" << endl ;
cin >> num_rows ;
return num_rows ;
}
// Function to specify number of coloumns.
{
int get_num_colms () ;
{
int num_colms ;
cout << "please enter the number of coloumn" << endl ;
cin >> num_colms ;
return num_colms ;
}
// Function to draw line of characters.
{
int rows ;
for ( int i = 1 ; i <= rows ; i ++ )
{
cout << wanted_char ;
}
int colms ;
for ( int j = 1 ; j <= colms ; j ++ )
{
cout << wanted_char ;
}
cout << endl << endl ;
}
error messages
c:\documents and settings\lyndsey scott\my documents\uni stuff\msc remote sensing\c++programs\tutorial4a\tutorial4a.cpp(21) : error C2065: 'num_rows' : undeclared identifier
1>c:\documents and settings\lyndsey scott\my documents\uni stuff\msc remote sensing\c++programs\tutorial4a\tutorial4a.cpp(23) : error C2065: 'num_colms' : undeclared identifier
1>c:\documents and settings\lyndsey scott\my documents\uni stuff\msc remote sensing\c++programs\tutorial4a\tutorial4a.cpp(80) : fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\lyndsey scott\my documents\uni stuff\msc remote sensing\c++programs\tutorial4a\tutorial4a.cpp(50)' was matched