Click here to Skip to main content
12,896,108 members (52,457 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


4 bookmarked
Posted 8 Dec 2009

bucket sort

, 29 Dec 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
class SealedClass //Sealed Class
	SealedClass(){} //Declaring the Constructor in the Private Section hence preventing it to be called out side the class
	int A;
	static SealedClass GetInstance()
		SealedClass sealedclassObj;
		return sealedclassObj;
class Inherited : SealedClass //will produce an Error SealedClass::SealedClass() is not accessible
	Inherited() {};
void main()
	int i;
	SealedClass SC = SealedClass::GetInstance(); //This way you can create the object of Sealed Class
	SC.A = 10;
	SealedClass SC1 = SealedClass::GetInstance();
	SC1.A = 20;
	cout << "SC.A = " << SC.A << "\n";
	cout << "SC1.A = " << SC1.A;


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Soumya Ranjan Das
Software Developer (Senior)
India India
Soumya is currently working as a Senior Software Developer in Mumbai. His programming experience contains following Technologies i.e. C# .Net ,VC++, MFC, COM, SQL Server, LINQ etc. You can find him at

You may also be interested in...

Comments and Discussions

QuestionWhy "bucket sort"? Pin
SAKryukov1-Jan-10 12:13
memberSAKryukov1-Jan-10 12:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170424.1 | Last Updated 29 Dec 2009
Article Copyright 2009 by Soumya Ranjan Das
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid