Ok, I am new with C/C++ and so I am trying to learn how to make it work. I made this program but for some reason after I enter the first number I want decoded it freezes up, can someone help me? Here is the code for the program:

#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <stdlib.h>

int main()
{
bool exitProg = false;
char inputChar[1000], outputChar[1000];
int inputInt[1000], outputInt[1000];
int mod = 0;
int e = 0;
int d = 0;*/
do
{
int t = 0;
int p = 0;
char mainChoice;
char inputChar[1000], outputChar[1000];
int inputInt[1000], outputInt[1000];
for(int b = 0; b <= 999; b++)
{
inputInt[b] = 0;
outputInt[b] = 0;
}
int mod = 0;
int e = 0;
int d = 0;
printf("Welcome to Dencoder, please type the letter of your selection:\n");
printf("a. Encode Message \nb. Decode Message\nc. Exit Program\n");
cin >> mainChoice;
switch(mainChoice)
{
case 'a':
printf("\n\nPlease enter your message you want encoded(use a _ for spaces):\n");
scanf("%s", &inputChar);
printf("\nPlease enter your modifier(a number, 1-100 to help better encode your message):\n");
cin >> mod;
printf("\nYour encoded message is:\n");
do
{

for(int i = 32; i <= 126; i++)
{

if(inputChar[e] == i)
{
outputInt[e] = i;

}
}
outputInt[e] = outputInt[e] + mod;
printf("%d ", outputInt[e]);
if(inputInt[e] = '\0')
{
outputInt[e] = '\0';
}
e++;
}while(inputChar[e] != '\0');
printf("\n\n\n\n");
break;
case 'b':
printf("Enter the numbers of the message you want decoded(press enter after each number and type '-1' when done):\n");
for(t = 0; t != -1; t++)
{
scanf("%d\n", inputInt[t]);
if(inputInt[t] == -1)
{
t = -1;
}
}

printf("Enter the modifier of our message:\n");
cin >> mod;
for(p = 0; p != '\0'; p++)
{
inputInt[p] = inputInt[p] - mod;
}
do
{
int i;
for(i = 32; i <= 126; i++)
{

if(inputInt[e] == i)
{
outputChar[e] = i;

}

}
if(outputChar[e] == 95)
{
outputChar[e] = 32;
}
e++;
}while(inputInt[e] != '\0');
printf("\nHere is your decoded message:");
printf("\n%s", outputChar);
cout << endl << endl << endl << endl;
break;
case 'c':
exitProg = true;
break;
}
}while(exitProg == false);
return 0;
}


Please help me, I can't figure out why it keeps freezing... it gives me the encountered an error thing would you like to send an error report, I can't figure why this happens after the first entering of the number for decoding.
Please respond