Click here to Skip to main content
13,199,311 members (68,493 online)
Click here to Skip to main content

Tagged as


Posted 19 Jan 2013

c++ static object and static member of class

, 19 Jan 2013
A A::y=*new A;int A::x=5;These statements initialise the static variables: x is intialised to 5, and y is initialised to a new instance of an A object. You should be able to see how the other variables are initialised and changed by stepping through the code.You would also be well...



Compare Revision Minor Date Status Editor
2 - publicly available No 19-Jan-13 21:29 Available Richard MacCutchan
Updates in content. 109 changes had been made.
1 No 19-Jan-13 7:02 Available Richard MacCutchan


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


About the Author

Richard MacCutchan
United Kingdom United Kingdom
I was a Software Support Engineer for many years using various legacy enterprise systems before learning UNIX and Windows programming - the latter largely in my own time. In my last few years of employment I spent more time in actual development.

Since retiring I have been learning some of the newer technologies (C#, .NET, WPF, LINQ, SQL ...) that I never used in my professional life, and am actually able to understand some of it.

One day I hope to become a real programmer.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171020.1 | Last Updated 20 Jan 2013
Article Copyright 2013 by Richard MacCutchan
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid