|
#include<iostream> #include<cmath> #include<fstream> #include<iomanip> #include<string>
using namespace std; struct VoltageSource { string name; double volts; double amps; double watts; double rating_watts; double avg_watts; };
struct Resistor { string name; double volts; double amps; double watts; double ohms; double rating_watts; };
struct LoadResistor { string name; double volts; double amps; double watts; double avg_watts; double ohms; double lower_ohms; double upper_ohms; double min_volts; int low_voltage_event; };
struct LoadCurrent { string name; double volts; double amps; double watts; };
VoltageSource init( string name, double volts, double rating_watts, double avg_watts);
Resistor init( string name, double ohms, double rating_watts );
LoadResistor init( string name, double lower_ohms, double upper_ohms, double min_volts, double avg_watts);
LoadCurrent init( string name, double amps = 10.0 );
int event_counter(); void print(VoltageSource VS);
int main(void){
VoltageSource VS = init("VS", 100.0, 1000.0, 0.0);
cout << VS.name << endl;
return 0; }
// Why do I get the LNK Errors after compiling this code?
|