I am trying to create a diamond shape, I wrote this function to created it but I am only getting the bottom half of the diamond, the top part is giving me numbers, below is my code.please help
void Diamond::printDiamond()
{
const int N=21;
int length;
char shape;
You are missing curly braces in the else statement.
Also for (int i = 1; i < length; i+=2) always creates an up half with even symbols per row
You could use for (int i=!(length%2); i < length; i+=2)
It seems that you are using a class diamond. Why don't just put length and shape as attributes instead of getting them in the method.
This way the range test of length will be outside of print and get better error handling. (think in responsibilities)