hi everyone, please help: I doing a structure problem, it compiles fine, it looks fine to me as well, gives me stackdumpfile error. Any suggestions folks.. please help:
Below is my code:
/*
* structp.cpp
*
* Created on: Jan 31, 2014
* Author: BK
*/
#include<iostream>
#include<iomanip>
#include<string>
#include<cstdlib>
using namespace std;
struct DrinkData {
string nam;
float pr;
int nB;
};
if (drink[ch].nB < 1)
cout << "The item is sold out.\n";
else {
drink[ch].nB = drink[ch].nB - 1;
cout << "The price is : " << drink[ch].pr;
}
return;
}