distance does not name type mistake even though I suppose that I am right.
pls help
#include <cstdlib>
#include <iostream>
#include <conio.h>
#include <sstream>
// struct unit with loop inside....
using namespace std;
struct distance
{
int mt;
float cm;
};
struct room
{
distance length;
distance width;
};
int main(int argc, char *argv[])
{
room study;
float area;
study.length.mt=3; // study room , length=330 cm width=180cm
study.length.cm=30;
study.width.mt=1;
study.width.cm=80;
area=(study.length.mt+study.length.cm/100)*(study.width.mt+study.width.cm/100)
cout << "area=" << area <<" m2"; //area=length*width
system("PAUSE");
return EXIT_SUCCESS;
}