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
how to do 2, 4, 8 associativity

Q:  Tells the operators one can override; which operators should he override? A: Bottom line: don't puzzle your users. Remember the reason of operator overloading: to decreas

There are 3 acceptable answers: "Never," "Rarely "and" When the problem domain cannot be accurately modelled any other way."

Operation on String - C ++ Program: Write a program to define operations on string in c++. class String {    char *char_ptr;   // pointer to string contents    int le

P o i n t er s to Members: In C a pointer is created  to locate  the address of another variable  for faster access. Consider the following example. int x, *p; p =

Explain the parts of operators Assignment Operators The equal (=) sign is used for assigning a value to another. The left hand side has to be a variable (lvalue, which exc

Create a pseudocode in getting Calendar Quarter. The program should identify which quarter falls the given date. Note: Consider the date format DDMMYYYY.

Objective: Construct a C program that controls the UART, and is capable of displaying strings. Echo characters received on the UART to the LCD screen Outcome: A mess


Define the Bitwise Operators in c language? C has distinction of supporting special operators that known as bit wise operators for manipulation of data at bit level. These oper