Use of structs
please have following code 
and getting following compilation error
 							code: [select]
struct dhtreading
{
  float temp,humd;
  dhtreading(float t,float h)
  { temp = t; humd=h; }
};
struct sensorreadings
{
  dhtreading air1,air2;
  float water;
  sensorreadings(dhtreading a1,dhtreading a2,float w)
  { air1=a1;air2=a2;water=w;}
};
and getting following compilation error
code: [select]
tem.ino: in constructor 'sensorreadings::sensorreadings(dhtreading, dhtreading, float)':
rack_cooling_system:57: error: no matching function call 'dhtreading::dhtreading()'
   { air1=a1;air2=a2;water=w;}
   ^
how posting full program problem can seen in context ?
 							
            						 					Arduino Forum  						 						 							 >   					Using Arduino  						 						 							 >   					Programming Questions  						 						 							 >   					Use of structs  						 					
arduino
 
  
Comments
Post a Comment