QUOTE(harish2rock @ 12 Feb, 2008 - 10:37 AM)

class PANELDATA
{
class title
{
public:
void description()
{
cout << "Panel Method for Runway no. 312" <<\n << "Intended for Saras Wing Aircraft" ;
//multiline text
}
};
};
main()
{
//Body
}
Does the code given above adher to what the program logic states ? Its there in the 1st post of this topic..
CODE
#include <iostream>/*change -1*/
using namespace std; /*change 0*/
class PANELDATA {
public: /*change 1*/
class TITLE {
public:
void description(){
cout << "Panel Method for Runway no. 312" <<endl<< "Intended for Saras Wing Aircraft"; /*change 2*/
//multiline text
}
};
};
int main(){ /*change 3*/
PANELDATA::TITLE pdt;
pdt.description();
return 0; /*change 4*/
}
I don't know how much you know about programming so I will explain all the changes

.
Here they go:
change -1 : include header files to use pre-defined functions.
change 0 :
using namespace std; to use certain commands like cout etc.
change 1 : if you want to access anything inside a child class you need to define the child class as public.
change 2 : use endl instead of \n , you can still use \n inside strings.
change 3 : most compilers in c++ expect a return value from the main function. normally a warning
comes up.
change 4 :
return 0; returns an int value at the end of the main function