Hey Guys,
I am kind of new to CPP programming, and I am developing a small application which calculates Daily gain in Future Market based on Settlement Prices.
I need a help in creating an array in following Header file. i.e at float settPrice[days_to_delivery]; //
If this is Not the way to do , can you kindly let me know how can I do that?
Note: I have Der.h , Der.cpp and main.cpp files. pasting the Der.h code here
#include<iostream>
#include<string>
usingnamespace std;
#ifndef Der_H
#define Der_H
class Der {
public:
void setTradingDetails();
//setTradeData()-- picks the Trade Price for Day-1 and Number of Days for Delivery
void getTradingDetails();
//getTradeData()-- gets the Trade Price for Day-1 and Number of Days for Delivery
private:
int days_to_delivery;
float tradePrice;
int cSize;
int cQuantity;
float settPrice[days_to_delivery]; // I need Help here , create a array for settPrice based on days_to_delivery input given in code
};//end of Class
#endif