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
Explain a class to model a banking system. The function members should allow initializing the data members, a query to facilitate for account and a facility to deposit and with

Write a C program to compute the factorial of  5 i.e. 1x2x3x4x5 etc Write a C program to calculate the output Y for a given value of X for the following formula.       Y=X 2

Problem: (a) Describe a linked list. (b) Explain the three different types of linked list with the help of diagrams. (c) Give two advantages and two disadvantages o

Introduction. In this assignment you are required to revisit the Assignment 1 topic. You will develop a new program which is more sophisticated, in particular, adding more functio

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

¦It should ask customers to enter details such as their names and addresses. ¦It should print a welcome message that includes the customer’s name. ¦It should provide a list of avai

Define the Category of Function? A function, depending on whether arguments or parameters are present or not and whether a value returned or not, may belong to one of the foll

who to write max if statements in a program

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes