// function which populates the value of currentTemp and maxTemp
result = smartHlpTemperatureGet( &sh, ¤tTemp, &maxTemp );
// Adding maxTemp and currentTemp to the structure after gettin
diskDataT->currentTemp = currentTemp;
diskDataT->maxTemp = maxTemp;
// Following cout is printing the value properly
cout<<"Temperatures - Current"<<currentTemp<<"Max Temperature ="<<maxTemp<<endl;
//structure in which the above variables are declared
struct diskDataDetailed
{
uint8_t currentTemp;
uint8_t maxTemp;
}
//Does not print the value of currentTemp
cout<<diskDataT->currentTemp<<endl;
//Output for above cout
$
I don't understand where I am going wrong.