Define local classes, C/C++ Programming

A class can be defined inside a block or function.  This type class is known local class. There are few points to be observed when producing class inside the function or block.

·     Local class can use access global variable with scope operator (::).

·     Local class cannot remain static data member.

·     Local class member function must be defined inside its class that is it can have only inline function.

Posted Date: 9/20/2012 8:03:56 AM | Location : United States







Related Discussions:- Define local classes, Assignment Help, Ask Question on Define local classes, Get Answer, Expert's Help, Define local classes Discussions

Write discussion on Define local classes
Your posts are moderated
Related Questions
THIS PROGRAM IS TO ASK A DATE & ALSO ASK FOR DAYS TO BE ADDED TO PRODUCE #include #include struct date  {   int dd;   int yy;   int mm;  }; void main()  {  clrscr();  in

Simpson's Rule is a more accurate method of numerical integration than the method described in class. Using Simpson's Rule, the integral of a function f between a and b is approxim


Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and

Question 1: (a) Describe the following objects and condition states: (i) ifstream and ofstream objects (ii) eof(), fail(), bad() and good() functions. (b) Write a C++ pr

C Program for REMOVING CHAR WHICH U WANT void main() {           int i,j;           char a[100],r;           clrscr();           for(i=0;i


write a program to find the area under the curve y=f(x) between x=a and x=b integrate y=f(x)   #include float start_point, /* GLOBAL VARIABLES */

C Program for SORTING OF NUMBERS   main() {           int a[20],i,j,temp,n;           clrscr();           printf("ENTER THE MAXIMUM LIMIT: ");           scan

Program for calculate average of total marks: #include using namespace std; void print(int marks_arr[],int cnt) { int ind[cnt]; int i=0; int j=0; int k=0;