# C++ help needed!!



## babe9990 (May 14, 2005)

can anybody help me plz!!????

this assignment is killing me~~

I have to hand it in by tomorrow =(

can someone plz help me out to fill the blank in

the functions

it has to look like this
/*

....................
....................
..CCCCCC............
..CCCCCC...#....#...
..CCC.....###..###..
..CCC......#....#...
..CCCCCC............
..CCCCCC............
....................
....................Press any key to continue
*/

// board.cpp

#include <iostream>
using namespace::std;


const int NUM_ROWS = 10, // Board dimensions
NUM_COLS = 20;

// Function prototypes

void fillRectangle ( char board[NUM_ROWS] [NUM_COLS] ,
int row, int col,
int width, int height, char fillChar );

void displayBoard ( const char board[NUM_ROWS] [NUM_COLS] );

//--------------------------------------------------------------------

int main ()
{
char board[NUM_ROWS][NUM_COLS]; // Message board

// Initialize the message board to all periods.
fillRectangle(board,0,0,NUM_COLS,NUM_ROWS,'.');

// Load and display a message.
fillRectangle(board,2,2,6,2,'C');
fillRectangle(board,4,2,3,4,'C');
fillRectangle(board,6,5,3,2,'C');
fillRectangle(board,4,10,3,1,'#');
fillRectangle(board,3,16,1,3,'#');
fillRectangle(board,3,11,1,3,'#');
fillRectangle(board,4,15,3,1,'#');
cout << endl;
displayBoard(board);

return 0;
}

//--------------------------------------------------------------------
// Insert your function implementations here.
//--------------------------------------------------------------------

void fillRectangle ( char board[NUM_ROWS][NUM_COLS],
int row, int col,
int width, int height, char fillChar )

// Fills in the specified rectangle on the message board with the
// character fillChar.


{

:sayyes: here



}

//--------------------------------------------------------------------

void displayBoard ( const char board[NUM_ROWS][NUM_COLS])

// Displays the message board.

{

:sayyes: and here



}

/*

....................
....................
..CCCCCC............
..CCCCCC...#....#...
..CCC.....###..###..
..CCC......#....#...
..CCCCCC............
..CCCCCC............
....................
....................
Press any key to continue
*/


----------



## LoneWolf071 (Nov 10, 2004)

are you making this a GUI app or a dos one? You can make the Press any key to continue Line happen by using the 

#include <stdlib.h> Header and the system("pause"); command for dos and the system("sleep _x_"); where as the x is the number of seconds you want a delay...


----------

