473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

[gcc/qcc] Zakres dzialania static'a (?)

Q
mam klase, w tej klasie mam funkcje (w sekcji private)
a w tej funkcji mam zmienna typu static;

czy jak stworze kilka obiektow tej klasy,
to wszystkie one beda wspoldzielic ta zmienna statyczna ?

Mar 5 '08 #1
5 1969
On 5 Mar, 15:58, "Q" <n...@spam.plwrote:
mam klase, w tej klasie mam funkcje (w sekcji private)
a w tej funkcji mam zmienna typu static;

czy jak stworze kilka obiektow tej klasy,
to wszystkie one beda wspoldzielic ta zmienna statyczna ?
Prosta odpowied¼: TAK
Quick answer: YES
Mar 5 '08 #2
lo******@gmail.com wrote:
On 5 Mar, 15:58, "Q" <n...@spam.plwrote:
>mam klase, w tej klasie mam funkcje (w sekcji private)
a w tej funkcji mam zmienna typu static;

czy jak stworze kilka obiektow tej klasy,
to wszystkie one beda wspoldzielic ta zmienna statyczna ?

Prosta odpowied¼: TAK
Quick answer: YES
OK, we know the answer. What was the question? Thanks.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Mar 5 '08 #3
Q napisa³(a):
mam klase, w tej klasie mam funkcje (w sekcji private)
a w tej funkcji mam zmienna typu static;

czy jak stworze kilka obiektow tej klasy,
to wszystkie one beda wspoldzielic ta zmienna statyczna ?
you may want to post to pl.comp.lang.c next time
(yes, c++ is handled there too)
Mar 5 '08 #4
Q
you may want to post to pl.comp.lang.c next time
(yes, c++ is handled there too)
ups, it's not pl* group...
sorry for my "faux pas" and thanks for the answer :)

ps.
do I get enough sleep?
the answer is: no :)
Mar 6 '08 #5
On 5 Mrz., 16:54, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
lolli...@gmail.com wrote:
On 5 Mar, 15:58, "Q" <n...@spam.plwrote:
mam klase, w tej klasie mam funkcje (w sekcji private)
a w tej funkcji mam zmienna typu static;
czy jak stworze kilka obiektow tej klasy,
to wszystkie one beda wspoldzielic ta zmienna statyczna ?
Prosta odpowied¼: TAK
Quick answer: YES

OK, we know the answer. *What was the question? *Thanks.
Victor, sometimes it is better not to know the question (see the
Ultimate Question of Life, the Universe and Everything Else).

Stuart
Mar 6 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ryan Liu | last post by:
Hi All, Now I am porting CC to GCC and I have some problems. Would you mind tell me some document which have some description how to port CC to GCC ?? Thank you very much. Ryan
3
by: daniel_shaw01 | last post by:
I want to link the C++ standard libraries statically for my application because I don't space for the .so files on my target platform. After quite a bit of searching, I found very little...
3
by: ken | last post by:
template<class T> class cSingleton : public T { private: cSingleton() {}; public: static T* GetInstance() { static cSingleton instance;
3
by: fewgoodmen | last post by:
I am currently working on changing the compiler from Sun Workshop to g++ for a mid sized C program. In the C files we have static variables defined and declared. This works fine with the Sun...
8
by: pemo | last post by:
I've just been trying out the Watcom compiler from http://www.openwatcom.org, and almost immediately compiled some working source that errored. The code is char buffer; ...
31
by: alex.gman | last post by:
Is it me, or does VC++ 2005 produce much better code than GCC? (about twofold difference in the release configuration vs -O3) Has anyone done a comprehensive study?
7
by: Chameleon | last post by:
This code below compiles fine with VS.2005 but with gcc 3.4.2 not. ------------------ template<class T> static void Wastage1D::clever_erase(vector<T> &v, vector<typename vector<T>::iterator>...
5
by: richard.parker | last post by:
Hello, I need to overload operator new with affecting the system libraries. Has anyone done this? I've got 2 static libraries and application source code where the operator needs to be...
2
by: Dave Rudolf | last post by:
Hey all, So I have a template class whose only template parameter is a type that the class is to manage. It's actually an implementation of the common Singleton design pattern. The class looks...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.