First off I hope everyone had a great Thanksgiving. I am writing a program that lets the user enter a number and it is converted and displayed in roman. Then the number as well as the longRoman(in caps), the longRoman, The shortRoman(in caps), and the short roman is stored into two parallel arrays of 20 elements. One array must contain whole number and the other must contain strings.The number that the user enters needs to continue to count up to 20 consecutive numbers. I keep getting an error message "piece is being used without being initialized" and I cannot figure that out. Also I am having trouble with the arrays. If someone could please point me in the right direction it would be greatly appreciated. I had it to where it would put out the roman but now it won't even do that. I feel like I am doing more damage as I go along

This is what I have now.

#include "stdafx.h"

#include <iostream>

#include <string>

using namespace std;

char list [100] [20];

int _tmain( )

{

string roman;

int integer;

int piece;

int Decimal;

int LongRoman;

int ShortRoman;

cout << "Enter an integer and get the long and short roman numbers equivalant to that integer." << endl;

cout << " Enter an integer from 1-5000" << endl;

cin >> integer;

if((integer >= 5000) || (integer <=0))

{

cout << endl << "Invalid Integer" << endl;

}

else

{

if(integer >=1000)

piece = (integer / 1000);

for(int i = 0; i < piece; i++)

{

roman += "M";

}

integer%= 1000;

}

if( integer >= 100)

{

piece =(integer / 100);

if( piece ==9)

{

roman += "CM";

}

else if (piece >= 5)

{

roman += "D";

for( int i = 0; i < piece-5; i++)

{

roman += "C";

}

}

else if ( piece == 4)

{

roman += "CD";

}

else if (piece >1)

{

for( int i= 0; i < piece; i++)

{

roman += "C";

}

}

integer %= 100;

}

if ( integer >= 10)

{

piece = (integer / 10);

if ( piece ==9)

{

roman += "XC";

}

else if( piece >= 5)

{

roman += "L";

for( int i = 0; i < piece-5; i++)

{

roman += "X";

}

}

else if ( piece == 4)

{

roman += "XL";

}

else if ( piece >= 1)

{

for( int i = 0; i < piece; i++)

{

roman += "X";

}

}

integer %= 10;

}

if( integer >= 1)

{

piece = integer;

if( piece == 9)

{

roman += "IX";

}

else if( piece >=5)

{

roman += "V";

for( int i = 0; i < piece-5; i++)

{

roman += "I";

}

}

else if( piece ==4)

{

roman += "IV";

}

else if( piece >= 1)

{

for( int i = 0; i < piece; i++)

{

roman += "I";

}

}

}

cout << "Decimal" << "LongRoman" << "ShortRoman" << endl;

system ("pause");

return 0;

}