Hi,
I am trying to make an array of 16 in windows form application with visual studio, but I am not sure how to do that with a float. I want the array to be incorporated into a chart that I have made. Can anyone help?
My code is below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
public ref class Form1 : public System::Windows::Forms::Form
{
float f_tempTopPlate;
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
int PlotData1;
int i;
f_tempTopPlate = 2;
for(i = 0; i < 16; i++)
{
PlotData1 = f_tempTopPlate = 7*i - 20;
}
chart6->Series->Add("Series1");
chart6->Series["Series1"]->Color = Color::Green;
chart6->Series["Series1"]->ChartType = System::Windows::Forms::DataVisualization::Charting::SeriesChartType::Line;
chart6->Series["Series1"]->Points->AddXY(0,PlotData1);