i am mostly familiar with java and c++ is not my strong spot..
I am trying to write algorithm for cpu scheduler most of my code is syntax error free but I am stuck to one problem.
My program uses 2 classes Process and ProcessQueue
my main looks like this
int main(){
fstream f;
ProcessQueue pq;
f.open("input.txt");
if (!f)
{
cout << "File not Found";
}else{
int noOfProcess;
f >> noOfProcess;
Process *p;
p = new Process[noOfProcess];
for (int i = 0;i<noOfProcess;i++){
int arivalTime;
int cpuTime;
int prorityNumber;
f >> arrivalTime;
f >> cpuTime;
f >> prorityNumber;
p[i] = new Process(arrivalTime,cpuTime,prorityNumber);
}
return 0;
}
but p[i] is causing trouble.. I am not able to use parametric constructor,setters.
it gives following error

pdoesn't point to an array of pointers, but an array of objects. Tryp[i] = Process(...)(without thenewkeyword).