How would you trace this?

#include <iostream>
#include <string>

using namespace std;


void main()
{
int flag, i, size;
string Array[10], target;

size = 9;


/*Trace
target flag size i Array output





/*

Array[0] = "m";
Array[1] = "j";
Array[2] = "f";
Array[3] = "b";
Array[4] = "e";
Array[5] = "c";
Array[6] = "h";
Array[7] = "d";
Array[8] = "p";
Array[9] = "g";

cout << "Enter a leter to search for ";
cin >> target;

for(i = 0; i <= size; i++)
{
if ( target == Array[i] )
{
flag = 1;
}
}

if (flag == 1)
{
cout << "Found it " << endl;
}
else
{
cout << "Not found " << endl;
}

system("PAUSE");

return;
}

I have no idea what you want to know, but AFAIK in C++ main must return an int.
Topic archived. No new replies allowed.