Click to See Complete Forum and Search --> : How do I represent data from an array in a chart?


Alan Lemmon
May 12th, 1999, 03:49 PM
Hi,
New programmer here. I need help representing the contents of an array (from a function I created) in a chart. How is this typically done in the Builder environment? It would be most helpful if the chart responded to changes in array contents as the program ran. Any suggestions???????
THANX!

Hyena
May 13th, 1999, 09:58 AM
i'm a beginner too, and i would like to help becasue i believe my answer would be on the same wavelength as what you're thinking. however, it's hard to tell exactly what you want without some code. the following is just a guess at what you are thinking:


#include <iostream.h>
#include <iomanip.h>


void main()
{
int array[5];

cout.setf(ios::fixed, ios::floatfield);
cout.setf(ios::showpoint);

//get info into array here ......................
//...............................................

cout << "Int1 Int2 Int3 Int4 Int5\n";

for(int x = 0; x < 5; x++)
{
cout << array[x] << setw(5);
}

cout << "\n";
}