Hi, I am trying to solve a problem. But when I execute it, it is just like halt and not further processing......
Here is my program function
void utility() // Calculate the utility for users for both period Fun5
{
double x,y,z,utility1,utility2;
double delaycost = 10;
ifstream inFile3,inFile4,inFile5,inFile6;
ofstream utili1,utili2;
cout<<"Find out the Utility function for each User in each time Interval:\n";
inFile3.open("Utility.txt");
if(!inFile3) {
cout<<"Unable to open Utility file in function utility";
exit(1);
}
inFile4.open("fixedcost1.txt");
if(!inFile4) {
cout<<"Unable to open file fixed cost 1 file in utility"<<endl;
exit(1);
}
inFile6.open("prival.txt");
if(!inFile6) {
cout<<"Unable to open filefixed cost 1 file in utility"<<endl;
exit(1);
}
utili1.open("expeutil1.txt");
while (inFile3 >>x) {
while (inFile4 >>y){
while (inFile6 >>z){
utility1= x- delaycost- y-z;
}
}
utili1<<z<<endl;
}
utili2.open("expeutil2.txt");
while (inFile3 >>x) {
while (inFile4 >>y){ // calculate each user
while (inFile6 >>z){ // benefit function in period 2
utility1= x- delaycost- y-z;
}
}
utili2<<z<<endl;
}
}
but when I run the program it shows
Find out the Utility function for each User in each time Interval:
and cursur blinking......
but after this it should have compute further operations........
I have each file 1000 of data.
I am using Dev-Cpp 4.9.9.2 on windows 7.
please help me out.......its very urgent....
thanks in advance...