FAQ - sekcja [4]:
[4.1] Co nowego w wersji 09/02? 
[Recently created (in 9/02). Click here to go to the next FAQ in the "chain" of recent changes.]
Big-picture changes:
- Hiperlinki mają teraz "hover text" tekst, który większość
przeglądarek pokazuje kiedy najedziesz myszką na link (ale prosze nie pisz do
mnie jeśli akurat twoja przeglądarka nie obsługuje tej funkcji; większość
browserów to robi ale niektóre nie).
- Dodany nowy mirror
- w Polsce.
- Dodano sporo nowych pozycji w
indeksie.
New FAQs:
Changed FAQs:
- [5.1] Co oznacza akronim IMHO? (lub IMO, IMNSHO, FWIW, OTOH, etc.)?
(dodany PMFJI INDEX: Akronimy INDEX: comp.lang.c++@Akronimy)
- [7.6] W jaki sposób mogę uniemożliwić innym programistom podglądanie "prywatnych" fragmentów mojej klasy?
(Wesja polska - poprawiono treść drugiego akapitu, poprzednia odbiegała od oryginału)
- [9.1] O co wogóle chodzi z tymi funkcjami inline?
(odpowiedź napisana na nowo, dodano kilka nowych punktów)
- [9.3] Czy funkcje inline zwiększają wydajność?
(rewrote, added numerous new points)
- [9.4] W jaki sposób funkcje inline pomagają uzyskać kompromis
między bezpieczeństwem a szybkością działania?
(Wersja polska - poprawiono drugi akapit.)
- [9.5] Dlaczego powinienem używać funkcji inline functions
zamiast starych makr #define?
(wordsmithed)
- [10.3] Czy konstruktor pewnej klasy może wywołać inny konstruktor
należący do tej samej klasy, tak aby zainicjował ten sam obiekt?
(napisany ponownie w celu dokładniejszego wyjaśnienia, dziękuję za uwagi Nikolai Borissov)
- [10.3] Czy konstruktor pewnej klasy może wywołać inny konstruktor
należący do tej samej klasy, tak aby zainicjował ten sam obiekt?
(Wesja polska - poprawiono drugi akapit, aby zbliżyć go bardziej do oryginału)
- [10.4] Czy domyślnym konstruktorem dla klasy Fred jest zawsze
Fred::Fred()?
(częściowo przepisany dla lepszego wyjaśnienia tematu)
- [10.5] Który konstruktor zostanie wywołany, jeśli
utworzę tablicę obiektów klasy Fred?
(Wersja polska - usunięto błędny przypis tłumacza sprzed ostatniego akapitu)
- [11.6] Co zrobić w sytuacji, gdy chcę "ubić"
lokalny obiekt przed końcem bloku, w którym jest on zdefiniowany (przed
znakiem })? Czy mogę jawnie wywołać destruktor lokalnego obiektu jeśli
naprawdę tego potrzebuję?
(wordsmithed)
- [14.3] Jakie są zalety i wady stosowania
"funkcji-przyjaciół"?
(Wersja polska - poprawiono komentarz w kodzie: z "unieważnia" na "przeciąża")
- [15.5] Dlaczego mój program pomija instrukcję odczytu
po zakończeniu pierwszej iteracji?
(Wersja polska - poprawiono przypis tłumacza)
- [17.4] How should I handle resources if my constructors may
throw exceptions?
(added the example and the admonition to use a typedef)
- [17.5] How do I change the string-length of an array of
char to prevent memory leaks even if/when someone throws an exception?
(rewrote to clarify/strengthen)
- [18.8] What does "Fred const& x" mean?
(rewrote to address the "guru approach")
- [20.5] When should my destructor be virtual?
(rewrote)
- [21.3] Is a parking-lot-of-Car a kind-of
parking-lot-of-Vehicle?
(strengthened in several places)
- [21.8] But I have a Ph.D. in Mathematics, and I'm
sure a Circle is a kind of an Ellipse! Does this mean Marshall Cline
is stupid? Or that C++ is stupid? Or that OO is stupid?
(fixed typo in first paragraph thanks to Jim Fischer)
- [21.11] If SortedList has exactly the same
public interface as List, is SortedList a kind-of List?
(strengthened the wording in a few places)
- [23.3] When my base class's constructor calls a
virtual function on its this object, why doesn't my derived class's
override of that virtual function get invoked?
(rewrote completely and added an example program)
- [23.5] Should a derived class redefine ("override") a
member function that is non-virtual in a base class?
(reworded the question clarification)
- [23.6] What's the meaning of, Warning: Derived::f(float) hides Base::f(int)?
(changed typo f(double) to f(float) thanks to Tarjei Knapstad)
- [25.9] When initializing static data members of
built-in / intrinsic / primitive types, should I worry about the "static
initialization order fiasco"?
(reworded thanks to Orjan Petersson)
- [28.2] Where do I start? Why do I feel so confused, so stupid?
(added sites for "sample problems")
- [28.16] Why is floating point so inaccurate? Why doesn't this
print 0.43?
(moved from the Miscellaneous Technical Issues section)
- [28.17] Why doesn't my floating-point comparison work?
(added links to David Goldberg's paper and to Doug Priest's supplement thanks to Kevin Quitt; added a definition for isEqual(double,double) thanks to Steve Summit; moved from the Miscellaneous Technical Issues section)
- [31.5] How can I call a non-system C function f(int,char,float)
from my C++ code?
(changed "C code" to "C++ code" in the first sentence thanks to Sreenivas Sunil Penumarthy)
- [32.5] How can I avoid syntax errors when calling a member
function using a pointer-to-member-function?
(made it clearer there is an and between the recommended typedef and macro)
- [32.6] How do I create and use an array of pointers to member
functions?
(made it clearer there is an and between the recommended typedef and macro)
- [34.4] Where can I get help on how to use STL?
(wordsmithed for clarity)
- [34.9] Where can I get tons and tons of more information on C++
class libraries?
(added the "with frames" URL for the C++ Libraries FAQ and the comment about google, both thanks to Henrik Haraldsson)
- [37.1] How can I generate HTML documentation for my classes?
Does C++ have anything similar to javadoc?
(moved from the Miscellaneous Technical Issues section)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.2] Co nowego w wersji 06/02 ? 
[Recently created (in 6/02). Click here to go to the next FAQ in the "chain" of recent changes.]
Big-picture changes:
New FAQs:
Changed FAQs:
- [2.7] Skąd mogę pobrać portugalską wersję C++ FAQ Lite?
(zaktualizowany URL)
- [3.1] Czy oprócz C++ FAQ Lite jest także C++ FAQ Book?
(zmieniony URL dla okładki książki i excerpts podziękowania: Thomas Hansen; dodany również przykładowy rozdział i kod źródłowy.)
- [5.6] Chwileczkę, przecież poprzednie faq mówi żeby
nie nie odpowiadać na pytania zawarte w FAQ?!?
(fixed misspelling in "cripple" thanks to John Marshall plus general rewording)
- [5.13] Co ze spamem?
(fixed a typo thanks to Paul Savage)
- [10.6] Czy moje konstruktory powinny używać "list inicjujących" czy "przypisań"?
(dodano argument za stosowaniem list inicjujących, związany z nie-statycznymi, stałymi składowymi; dziękuję za uwagę Tanmoy Bhattacharya)
- [10.13] Dlaczego w metodzie "konstruuj przy pierwszym użyciu" (ang. "construct-on-first-use idiom"] używa się statycznego wskaźnika, a nie statycznego obiektu?
(wprowadzono istotne zmiany do drugiego i kolejnych akapitów, dziękuję za uwagę Amitha Perera i Wil Evers)
- [18.10] What do I do if I want a const member function to
make an "invisible" change to a data member?
(reworded the question to distinguish "invisible change" from "invisible data member" thanks to Thomas Hansen)
- [25.4] But, but, but what about machines where a char has more
than 8 bits? Surely you're not saying a C++ byte might have more than 8 bits,
are you?!?
(removed a superfluous statement thanks to Gennaro Prota)
- [25.6] I'm sooooo confused. Would you please go over the rules
about bytes, chars, and characters one more time?
(rewrote; changed the example from the mythical FOO machine to a PDP-10, plus added words showing how to simulate pointers using software, much thanks to Andrew Koenig)
- [25.7] What is a "POD type"?
(added note that POD types can contain non-virtual member functions thanks to Andrew Koenig)
- [25.8] When initializing non-static data members of
built-in / intrinsic / primitive types, should I use the "initialization list"
or assignment?
(clarified the cross-reference)
- [25.9] When initializing static data members of
built-in / intrinsic / primitive types, should I worry about the "static
initialization order fiasco"?
(made it clearer that the FAQ provides a solution)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(updated the link to KAI C++)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.3] Co nowego w wersji 05/02 ?
Big-picture changes:
New FAQs:
- [4.3] Co nowego w wersji 05/02 ?
- [5.6] Chwileczkę, przecież poprzednie faq mówi żeby
nie nie odpowiadać na pytania zawarte w FAQ?!?
- [15.12] W jaki sposób mogę sprawdzić "czy klawisz" lub "który klawisz"
został wciśnięty zanim użytkownik nacisnął ENTER?
(inspired by a posting by Alan Didey)
- [15.13] W jaki sposób można wyłączyć automatyczne wyświetlanie
znaków wpisanych przez użytkownika [ang. echo]?
- [15.14] W jaki sposób mogę zmienić położenie kursora na
ekranie?
- [25.1] Can sizeof(char) be 2 on some machines? For example, what
about double-byte characters?
(inspired by Randy Sherman)
- [25.2] What are the units of sizeof?
(inspired by Randy Sherman)
- [25.3] Whoa, but what about machines or compilers that support
multibyte characters. Are you saying that a "character" and a char might be
different?!?
(inspired by Randy Sherman)
- [25.4] But, but, but what about machines where a char has more
than 8 bits? Surely you're not saying a C++ byte might have more than 8 bits,
are you?!?
(thanks to Randy Sherman)
- [25.5] Okay, I could imagine a machine with 9-bit bytes. But
surely not 16-bit bytes or 32-bit bytes, right?
(thanks to Randy Sherman)
- [25.6] I'm sooooo confused. Would you please go over the rules
about bytes, chars, and characters one more time?
(thanks to Randy Sherman)
- [25.7] What is a "POD type"?
- [25.8] When initializing non-static data members of
built-in / intrinsic / primitive types, should I use the "initialization list"
or assignment?
- [25.9] When initializing static data members of
built-in / intrinsic / primitive types, should I worry about the "static
initialization order fiasco"?
- [25.10] Can I define an operator overload
that works with built-in / intrinsic / primitive types?
- [25.11] When I delete an array of some built-in /
intrinsic / primitive type, why can't I just say delete a instead of
delete[] a?
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.4] Co nowego w wersji 04/02 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.5] Co nowego w wersji 03/02 ?
Global changes:
- Changed the HTML "anchor" scheme so it conforms to
the
standard. Thanks to Eric Anderson for pointing this out.
New FAQs:
Changed FAQs:
- [3.1] Czy oprócz C++ FAQ Lite jest także C++ FAQ Book?
(zmieniony URL for book excerpts thanks to Chris Young)
- [5.1] Co oznacza akronim IMHO? (lub IMO, IMNSHO, FWIW, OTOH, etc.)?
(dodany OO)
- [6.10] Czy C++ jest wstecznie kompatybilny z ANSI/ISO C?
(sklarowany związek pomiędzy f() w C i f(...) w C++ podziękowanie Stefan Farfeleder)
- [6.12] Gdzie mogę dostać kopię standardu ANSI/ISO C++?
(swapped some mixed up links thanks to Randal Leistikow)
- [8.7] Czym jest uchwyt ("handle") do obiektu?
Wskaźnikiem? Referencją? Wskaźnikiem do wskaźnika? Co to jest?
(zmieniono "wskaźniki do referencji" na "referencje do wskaźników", dziękuję za spostrzeżenie Scott Douglass)
- [13.1] O co chodzi z tym przeciążaniem operatora?
(added comment about templates and intrinsic types thanks to Phil Hibbs)
- [15.1] Dlaczego powinno się używać <iostream> zamiast
tradycyjnego <cstdio>?
(corrected grammar of first bullet ("better type safety" ==> "more type-safe") thanks to Tristan Miller)
- [15.17] Dlaczego nie mogę otworzyć pliku znajdującego
się w innym katalogu, jak na przykład "..\test.dat"?
(added an explanation as to why "/" is better than "\\" thanks to Chris Young)
- [16.2] Czy pamięć alokowaną przy użyciu new można
zwolnić funkcją free? I odwrotnie - czy pamięć alokowaną funkcją "malloc"
można zwolnić operatorem delete?
(strengthened)
- [18.10] What do I do if I want a const member function to
make an "invisible" change to a data member?
(added a caveat about this being a const Set* const thanks to Steve White)
- [20.4] Mam listę obiektów różnych typów a mój kod wymaga, żeby z dla
każdego z tych obiektów wykonywać właściwe dla niego czynności. Wydaje się, że
powinienem użyć łączenia dynamicznego, ale nie umiem sobie z tym poradzić. Co
mam robić??
(fixed typo in a typedef thanks to Salminen Kari; plus various clarifications throughout)
- [20.6] What is a "virtual constructor"?
(added parenthetical recommendation about slicing thanks to Jesse Jones)
- [21.2] Derived* > Base* works OK; why doesn't
Derived** > Base** work?
(added a paragraph near the end about using a pointer cast thanks to Steve White)
- [21.6] Is a Circle a kind-of an Ellipse?
(reworded)
- [21.7] Are there other options to the "Circle is/isnot
kind-of Ellipse" dilemma?
(added words allowing Circle to be a state of Ellipse rather than a class in itself thanks to Nicholas Leippe)
- [21.8] But I have a Ph.D. in Mathematics, and I'm
sure a Circle is a kind of an Ellipse! Does this mean Marshall Cline
is stupid? Or that C++ is stupid? Or that OO is stupid?
(softened things up in two spots (thanks to Salminen Kari and Nicholas Leippe) and made it even more in-your-face in other spots (blame the author for this second set of changes I'm the meanie))
- [26.7] What source-file-name convention is best? foo.cpp?
foo.C? foo.cc?
(rewrote/wordsmithed thanks to Michael Tiller)
- [26.12] Are there any other sources of coding standards?
(removed a dead link thanks to Phil Hibbs)
- [27.7] What are some best-of-breed C++
programming-by-example guides?
(added Musser's STL book thanks to Xavier Outhier from D2SET scientific and technology non profit association)
- [28.17] Why doesn't my floating-point comparison work?
(added new book references thanks to Alan McKenney)
- [34.2] Where can I get a copy of "STL"?
(removed dead link to Musser's STL site thanks to Xavier Outhier from D2SET scientific and technology non profit association)
- [34.4] Where can I get help on how to use STL?
(removed dead link to Musser's STL site thanks to Xavier Outhier from D2SET scientific and technology non profit association; added link to book section)
- [34.9] Where can I get tons and tons of more information on C++
class libraries?
(added the URL to www.mathtools.net/C++/ thanks to Ophir Herbst; also added the boost.org URL)
- [35.1] Where can I download a free C++ compiler?
(added Digital Mars to the list (thanks Walter!))
- [35.4] How can I decompile an executable program back into C++ source
code?
(added caveat at the end re legitimate reasons to decompile)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(removed Symantec C++ since Symantec's web site says it is "discontinued," thanks to Richard Gill; added an annotation that the Digital Mars compiler is free, thanks to Walter Bright; and added the URL to the Cygwin-compiled version of GCC, thanks to Wouter Demuynck)
- [37.3] Are there any pretty-printers that reformat C++ source
code?
(added "Source Styler for C++" thanks to Alison Boyce)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.6] Co nowego w wersji 08/01 ?
Nowe opcje:
New FAQs:
Changed FAQs:
- [2.1] Najbliższy mirror z tym dokumentem.
(usunięty mirror w Finlandii nie był aktualizowany)
- [2.5] Skąd mogę pobrać chińską wersję C++ FAQ Lite?
(dodany URL dla wersji kodowanej w GB; podziękowania: Shen Min za tłumaczenie)
- [10.6] Czy moje konstruktory powinny używać "list inicjujących" czy "przypisań"?
(przeredagowano różne rzeczy, dziękuję Stan Brown)
- [10.7] Czy powinno się używać wskaźnika this wewnątrz konstruktora?
(poprawiono, dziękuję Stan Brown)
- [10.11] Co to jest "problem kolejności inicjalizacji statycznych" (ang. "static initialization order fiasco")?
(wypełniono lukę związaną z wbudowanymi/podstawowymi typami danych, dziękuję za uwagę Cyril Schmidt)
- [10.12] W jaki sposób mogę zapobiec problemowi
kolejności inicjalizacji obiektów statycznych (ang. "static initialization
order fiasco")?
(wypełniono lukę związaną z wbudowanymi/podstawowymi typami danych, dziękuję za uwagę Cyril Schmidt)
- [10.14] Jak mogę zapobiec problemowi kolejności inicjalizacji obiektów statycznych w przypadku statycznych pól klasy?
(wypełniono lukę związaną z wbudowanymi/podstawowymi typami danych, dziękuję za uwagę Cyril Schmidt)
- [10.17] Co to są "nazwane parametry" (ang. "Named Parameter Idiom")?
(poprawiono słownictwo i dodano nowy akapit na końcu, w wyniku inspiracji ze strony Stan Brown)
- [14.2] Czy przyjaciele klasy naruszają enkapsulację?
(added the last paragraph with inspiration from Stan Brown)
- [14.4] Co znaczy, że "przyjaźń nie jest
dziedziczona, przechodnia lub obustronna"?
(wordsmithed ("nor" vs. "or") thanks to Herbert Gintis)
- [15.18] Jak mogę przekonwertować pewną wartość (na przykład
liczbę) na typ std::string?
(changed <stdio> to <cstdio> thanks to Stan Brown)
- [15.19] Jak mogę przekonwertować napis typu std::string
na liczbę?
(changed <stdio> to <cstdio> thanks to Stan Brown)
- [16.5] Czy przy każdym użyciu operatora new muszę
sprawdzać, czy nie zwrócił on wartości NULL?
(changed endl to std::endl)
- [16.24] Can you absolutely prevent people
from subverting the reference counting mechanism, and if so, should
you?
(wordsmithed thanks to Stan Brown)
- [16.25] Can I use a garbage collector in C++?
(added cross-references thanks to Stan Brown)
- [16.26] What are the two kinds of garbage collectors for
C++?
(added a URL for Attardi and Flagella's CMM thanks to Markus Laker)
- [19.7] Jak mogę ochronić klasy pochodne przed zniszczeniem w
wypadku gdy zmieniam wewnętrzne części klasy bazowej?
(wordsmithed thanks to Stan Brown)
- [20.6] What is a "virtual constructor"?
(added the paragraph about MS VC++ 6.0's mishandling of Covariant Return Types; thanks to Karthik for pointing this out)
- [27.4] Should I buy one book, or several?
(wordsmithed thanks to Stan Brown)
- [31.1] What do I need to know when mixing C and C++ code?
(fixed a typo thanks to Kumaran Surrendra; added the paragraph on compiling everything, even C-style code, using a C++ compiler thanks to Gary Jenkins)
- [34.2] Where can I get a copy of "STL"?
(added comment about "<string>" thanks to Stan Brown)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(added URL for Digital Mars C++ thanks to Walter Bright)
- [36.3] What should be done with macros that need to
paste two tokens together?
(removed ambivalence regarding second layer of indirection when using ## thanks to Joshua Fraser and Ronald Fischer)
- [37.2] Is there a TeX or LaTeX macro that fixes the spacing on
"C++"?
(wordsmithed thanks to Stan Brown)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.7] Co nowego w wersji 04/01 ?
Global changes:
- Updated the opening page so it lists both the chain of recent
changes as well as the table of recent changes. This improvement is thanks to
a suggestion by John Kewley.
Główna strona FAQ przeniesiona pod adres www.parashift.com/c++-faq-lite/. (This was unfortunately
necessary due to a business issue involving AT&T and the previous web hosting
company, Cerf-Net.)
New FAQs:
Changed FAQs:
- [5.2] Co zrobić, żeby ktoś rozwiązał moje zadanie domowe za
mnie?
(dodany stuff o pytających o odrobienie ich zadania domowego via email)
- [6.12] Gdzie mogę dostać kopię standardu ANSI/ISO C++?
(total rewrite; changed several URLs thanks to Brian K. Hamon and Garen Parham)
- [9.3] Czy funkcje inline zwiększają wydajność?
(explained "code bloat" and also added lots of if's, and's and but's)
- [10.6] Czy moje konstruktory powinny używać "list inicjujących" czy "przypisań"?
(rozdział przepisany na nowo)
- [10.7] Czy powinno się używać wskaźnika this wewnątrz konstruktora?
(przepisano na nowo na skutek sugestii Perry Rapp)
- [10.9] Dlaczego nie mogę zainicjować składowych statycznych w liście inicjującej konstruktora?
(dodano "," w liście inicjującej, dziękuję za uwagę Yaroslav Mironov)
- [14.2] Czy przyjaciele klasy naruszają enkapsulację?
(made a bit more emphatic)
- [14.4] Co znaczy, że "przyjaźń nie jest
dziedziczona, przechodnia lub obustronna"?
(added the "not reciprocal" item thanks to Karel Roose)
- [15.8] Ale czy zamiast "zaprzyjaźnionej funkcji" nie
powinno się raczej definiować metod w stylu printOn()?
(fixed a bug thanks to Richard Hector)
- [16.16] Ale kod w poprzednim faqu jest taki skomplikowany i
podatny na błędy! Nie ma jakiegoś prostszego sposobu na to?
(fixed the Star Trek movie number thanks to Chris Sheppard)
- [16.16] Ale kod w poprzednim faqu jest taki skomplikowany i
podatny na błędy! Nie ma jakiegoś prostszego sposobu na to?
(wordsmithed last paragraph at the suggestion of Perry Rapp)
- [16.21] W jaki sposób mogę wprowadzić prosty licznik odniesień
[ang. reference counting] ?
(moved definition of Fred::create() methods below the definition of class FredPtr)
- [16.26] What are the two kinds of garbage collectors for
C++?
(added a URL for Bartlett's collector thanks to Abhishek)
- [17.2] How can I handle a constructor that fails?
(fixed typo ("its" vs. "it's") thanks to Wes Bemont)
- [24.2] How are "private inheritance" and "composition"
similar?
(changed the syntax to using Engine::start; and added the sixth distinction thanks to Stan Brown; added the third similarity; added "aggregation" as another synonym; wordsmithed various parts)
- [26.1] What are some good C++ coding standards?
(fixed typo changing "where" to "were" thanks to Robert Marshall)
- [26.11] Which is better: identifier names
that_look_like_this or identifier names thatLookLikeThis?
(clarified the last paragraph)
- [26.12] Are there any other sources of coding standards?
(added a new URL thanks to Christopher Lott; added www.arcticlabs.com/codingstandards/ thanks to Richard)
- [27.4] Should I buy one book, or several?
(rewrote; added the "programming by example" category)
- [30.2] What is "virtual data," and how-can / why-would I use it in
C++?
(fixed the sentence just before Pros & Cons list (changed StretchableArray to StretchableStack) thanks to Harri Klapuri)
- [31.2] How can I include a standard C header file in my C++
code?
(added the whole section on "compiling C code with a C++ compiler," with inspiration thanks to Sebastian Kapfer)
- [32.6] How do I create and use an array of pointers to member
functions?
(removed the array size from the declaration of array a, that way there's one less thing to change if someone ever adds another function-pointer to the array thanks to Serge Ansay)
- [33.1] Why should I use container classes rather than simple arrays?
(clarified "local" vs. "non-static local" thanks to Garen Parham)
- [35.1] Where can I download a free C++ compiler?
(changed to a different site since the old URL was dead thanks to Victor R. Volkman)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(fixed "Semantic" to "Symantec" and "Gary Comeau" to "Greg Comeau" thanks to Scott Tringali; fixed the URL to SGI's compiler thanks to Toon Knapen)
- [35.11] Is there a yacc-able C++ grammar?
(rewrote; added a new grammar/lexer plus a new URL for the old grammar/lexer thanks to Ed Willink)
- [37.2] Is there a TeX or LaTeX macro that fixes the spacing on
"C++"?
(added a new LaTeX macro thanks to Bob Kline; rewrote)
- [37.3] Are there any pretty-printers that reformat C++ source
code?
(fixed the URL for Artistic Style thanks to Claus Dahl; added A2PS thanks to Clark Dorman)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.8] Co nowego w wersji 07/00 ?
Global changes:
- Moved the main FAQ site to www.parashift.com/c++-faq-lite/. (This was unfortunately
necessary due to a business issue involving AT&T and the previous web hosting
company, Cerf-Net.)
New FAQs:
Changed FAQs:
- [2.5] Skąd mogę pobrać chińską wersję C++ FAQ Lite?
(zaktualizowany URL)
- [3.1] Czy oprócz C++ FAQ Lite jest także C++ FAQ Book?
(dodany BookPool.com i AllDirect.com; podziękowania: Stan Brown; reorganizacja)
- [3.2] Czy różnica pomiedzy C++ FAQ Lite
i C++ FAQ Book jest duża?
(zmienione 'much' na 'many'; podziękowania: Stan Brown)
- [6.5] Kto używa C++?
(przepisane)
- [6.8] Czy "wirtualne" funkcje (wiązanie dynamiczne) są
podstawą OO/C++?
(inserted "the" before "difference" thanks to Stan Brown and reworded references to STL)
- [6.11] Czy C++ jest standaryzowany?
(zmienione "has been finalized" na "was finalized" podziękwania Stan Brown)
- [6.12] Gdzie mogę dostać kopię standardu ANSI/ISO C++?
(added URLs to free copies of CD2)
- [9.5] Dlaczego powinienem używać funkcji inline functions
zamiast starych makr #define?
(rewrote the sentence on #define being evil)
- [10.5] Który konstruktor zostanie wywołany, jeśli
utworzę tablicę obiektów klasy Fred?
(wprowadzono nowy styl zapisu nagłówków oraz składnię std::, ponadto zmieniono odwołania do STL)
- [10.8] Co to są "nazwane konstruktory" (ang. "Named Constructor Idiom")?
(zmieniono słownictwo (Fred na Point), dziękuję za uwagę Roy LeCates)
- [12.3] OK, OK, już dobrze; Zajmę się pseudo-przypisaniami.
Jak to zrobić?
(reworded the last paragraph)
- [13.3] A może jakieś przykłady przeciążania operatora?
(changed so it uses the std:: syntax)
- [13.6] Mogę przeciążyć operator==
tak aby pozwolił mi porównać dwie char[] używając porównania łańcuchów?
(changed so it uses the std:: syntax)
- [13.8] Jak stworzyć operator indeksu dla klasy Matrix?
(changed so it uses new-style headers and the std:: syntax)
- [13.10] Should I design my classes from the outside
(interfaces first) or from the inside (data first)?
(changed so it uses new-style headers and the std:: syntax and reworded references to STL)
- [15.1] Dlaczego powinno się używać <iostream> zamiast
tradycyjnego <cstdio>?
(renamed "subclassable" to "inheritable" and revamped to use new-style headers)
- [15.2] Dlaczego mój program wpada w nieskończoną pętlę za
każdym razem, gdy użytkownik wpisze niewłaściwy znak?
(changed so it uses new-style headers and the std:: syntax)
- [15.3] Jak właściwie działa ta śmieszna instrukcja while (std::cin >> foo) ?
(changed so it uses new-style headers and the std:: syntax)
- [15.4] Dlaczego mój program próbuje odczytać dane za końcem
pliku?
(changed so it uses new-style headers and the std:: syntax)
- [15.5] Dlaczego mój program pomija instrukcję odczytu
po zakończeniu pierwszej iteracji?
(changed so it uses new-style headers and the std:: syntax)
- [15.7] W jaki sposób mogę umożliwić
wyświetlanie/drukowanie/wysyłanie/zapisywanie mojej klasy Fred?
(changed so it uses new-style headers and the std:: syntax)
- [15.9] W jaki sposób mogę umożliwić pobieranie ze strumienia
obiektów mojej klasy Fred?
(changed so it uses new-style headers and the std:: syntax)
- [15.10] W jaki sposób mogę dodać obsługę
drukowania/wyświetlania/wysyłania dla całej hierarchii klas?
(changed so it uses new-style headers and the std:: syntax)
- [15.11] W jaki sposób mogę otworzyć strumienie
std::cin i std::cout w trybie binarnym pod DOSem i/lub OS/2?
(changed so it uses new-style headers and the std:: syntax)
- [15.17] Dlaczego nie mogę otworzyć pliku znajdującego
się w innym katalogu, jak na przykład "..\test.dat"?
(changed so it uses new-style headers and uses the std:: syntax)
- [16.5] Czy przy każdym użyciu operatora new muszę
sprawdzać, czy nie zwrócił on wartości NULL?
(changed so it uses new-style headers and the std:: syntax)
- [16.6] W jaki sposób mogę przekonać mój (stary)
kompilator, aby automatycznie sprawdzał, czy operator new nie zwrócił
wskaźnika NULL?
(changed the example to use throw rather than abort() thanks to Stan Brown; changed to use new-style headers and the std:: syntax)
- [16.13] Mam tablicę alokowaną przy użyciu instrukcji p = new Fred[n]. Skąd kompilator wie, podczas jej kasowania instrukcją
delete[] p, że znajduje się w niej n obiektów?
(changed "popluar" to "popular" thanks to Fabrice Clerc)
- [16.15] Jak, przy użyciu operatora new, mogę alokować tablicę
wielowymiarową?
(fixed a leak in the third manipulateArray() by moving another for loop into the try block)
- [16.16] Ale kod w poprzednim faqu jest taki skomplikowany i
podatny na błędy! Nie ma jakiegoś prostszego sposobu na to?
(clarified the last paragraph)
- [16.17] Ale klasa Matrix z poprzedniego faqa
współpracuje tylko z klasą Fred! Czy nie da się zrobić tej klasy tak,
aby była bardziej uniwersalna?
(rewrote)
- [16.19] Czy w C++ są tablice, których wymiary można ustawić w
czasie działania programu?
(changed so it uses new-style headers and the std:: syntax and reworded references to STL)
- [16.22] W jaki sposób mogę wprowadzić licznik odniesień typu
"copy-on-write"?
(rewrote the first paragraph for clarity thanks to Fabrice Clerc)
- [16.23] W jaki sposób mogę wprowadzić licznik
odniesień typu "copy-on-write" dla całej hierarchii klas ?
(changed so it uses new-style headers and the std:: syntax)
- [17.5] How do I change the string-length of an array of
char to prevent memory leaks even if/when someone throws an exception?
(rewrote the last half)
- [18.1] What is "const correctness"?
(changed so it uses new-style headers and the std:: syntax)
- [18.2] How is "const correctness" related to ordinary
type safety?
(changed so it uses new-style headers and the std:: syntax)
- [18.9] What is a "const member function"?
(removed a spurious ")" thanks to Stan Brown)
- [18.12] Why does the compiler allow me to change an int after
I've pointed at it with a const int*?
(changed so it uses new-style headers and the std:: syntax)
- [19.3] W jaki sposób wyrazić dziedziczenie w C++ ?
(added "derived class of" to the list of synonyms)
- [19.7] Jak mogę ochronić klasy pochodne przed zniszczeniem w
wypadku gdy zmieniam wewnętrzne części klasy bazowej?
(renamed "subclass" to "derived class")
- [21.4] Is an array of Derived a kind-of array of Base?
(changed so it uses new-style headers and the std:: syntax and reworded references to STL)
- [21.5] Does array-of-Derived is-not-a-kind-of
array-of-Base mean arrays are bad?
(changed so it uses new-style headers and the std:: syntax and reworded references to STL)
- [22.3] What is an ABC?
(renamed "subclass" to "derived class")
- [22.4] What is a "pure virtual" member function?
(renamed "subclass" to "derived class")
- [24.3] Which should I prefer: composition or private
inheritance?
(changed so it uses new-style headers and the std:: syntax)
- [24.5] How is protected inheritance related to private
inheritance?
(renamed "subclass" to "derived class")
- [24.6] What are the access rules with private
and protected inheritance?
(renamed "subclass" to "derived class")
- [26.4] What's the difference between <xxx> and
<xxx.h> headers?
(changed <xyz.h> to <xxx.h> and wordsmithed thanks to Stan Brown)
- [26.5] Is the ?: operator evil since it can be used to create
unreadable code?
(changed so it uses new-style headers and the std:: syntax)
- [26.9] Are there any lint-like guidelines for C++?
(changed so it uses new-style headers and the std:: syntax)
- [26.11] Which is better: identifier names
that_look_like_this or identifier names thatLookLikeThis?
(improved the precision and added the last two paragraphs thanks to Chris Hurst)
- [26.12] Are there any other sources of coding standards?
(fixed some URLs thanks to James S. Adelman and Stan Brown)
- [28.16] Why is floating point so inaccurate? Why doesn't this
print 0.43?
(changed so it uses new-style headers and the std:: syntax)
- [29.4] How do you use inheritance in C++, and is that
different from Smalltalk?
(renamed "subclass" to "derived class")
- [29.5] What are the practical consequences of
differences in Smalltalk/C++ inheritance?
(renamed "subclass" to "derived class")
- [30.3] What's the difference between virtual data and
dynamic data?
(renamed "subclass" to "derived class")
- [30.8] Does the poor performance of reference semantics mean I
should pass-by-value?
(renamed "subclass" to "derived class")
- [33.2] How can I make a perl-like associative array in
C++?
(changed so it uses new-style headers and the std:: syntax)
- [33.4] How can I insert/access/change elements from a linked
list/hashtable/etc?
(reworded, plus changed so it uses new-style headers and the std:: syntax)
- [33.6] What's the syntax / semantics for a "class template"?
(changed so it uses new-style headers and the std:: syntax)
- [33.7] What's the syntax / semantics for a "function template"?
(changed so it uses new-style headers and the std:: syntax)
- [34.1] What is the "STL"?
(changed so it uses new-style headers and the std:: syntax)
- [34.2] Where can I get a copy of "STL"?
(added URLs for the SGI implementation and STLport thanks to Stan Brown)
- [34.3] How can I find a Fred object in an STL
container of Fred* such as std::vector<Fred*>?
(changed so it uses new-style headers and the std:: syntax)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(updated the URL for IBM VisualAge C++ thanks to Rick Alther; updated the URL for GNU C++ thanks to Martin Honnen)
- [36.1] What should be done with macros that contain if?
(added the last three paragraphs, including the link showing why we don't use do {...} while (false))
- [36.2] What should be done with macros that have multiple
lines?
(changed "if (1)..." to "if (true)..." and "do...while (0)" to "do...while (false)")
- [36.5] What are the C++ scoping rules for for loops?
(because the scoping rules for for loops are no longer "new" (thanks Stan Brown), rewote the FAQ)
- [36.11] Why can't I put a forward-declared class in a std::vector<>?
(changed so it uses new-style headers and the std:: syntax)
- [37.3] Are there any pretty-printers that reformat C++ source
code?
(added HPS Beauty)
- [37.6] Why does my DOS C++ program says "Sorry: floating
point code not linked"?
(added a cross reference and updated to new header syntax)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.9] Co nowego w wersji 03/00 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.10] Co nowego w wersji 01/00 ?
New FAQs:
Changed FAQs:
- [2.1] Najbliższy mirror z tym dokumentem.
(changed the rationale for choosing a close site thanks to Stan Brown)
- [2.4] Dlaczego pobieranie odbywa się via email? Dlaczego nie via ftp?
(dodana notka przypominanie o dezaktualizacji FAQ nie jest jeszcze zaimplementowane; podziękowania: Stan Brown)
- [5.1] Co oznacza akronim IMHO? (lub IMO, IMNSHO, FWIW, OTOH, etc.)?
(dodany IMAO; podziękowania Charles R Martin)
- [5.14] Gdzie mogę dostać FAQ danej grupy dyskusyjnej?
(dodany www.faqs.org podziękowania: Dan Kegel)
- [6.8] Czy "wirtualne" funkcje (wiązanie dynamiczne) są
podstawą OO/C++?
(reworded the second paragraph thanks to Stan Brown)
- [6.11] Czy C++ jest standaryzowany?
(zmienione "American National Standards Organization" na "American National Standards Institute" podziękowania Mark Jones; także poprawiony pierwszy akapit podziękowania Stan Brown)
- [12.1] Co to jest pseudo-przypisanie [ang. self-assignment] ?
(changed "knowning" to "knowing" thanks to Stan Brown)
- [12.3] OK, OK, już dobrze; Zajmę się pseudo-przypisaniami.
Jak to zrobić?
(reworded the last paragraph thanks to Stan Brown)
- [13.5] Jakie operatory mogą a jakie nie mogą być przeciążane?
(got rid of #if/#else/#endif by splitting the example thanks to Stan Brown)
- [15.17] Dlaczego nie mogę otworzyć pliku znajdującego
się w innym katalogu, jak na przykład "..\test.dat"?
(added an explanation that the library routines treat "/" and "\" interchangeably thanks to Stan Brown)
- [18.13] Does "const Fred* p" mean that *p
can't change?
(added an indication that there might be other non-const ways to get at the object thanks to Stan Brown)
- [20.2] W jaki sposób C++ jest w stanie pogodzić
dynamiczne łączenie ze statyczną kontrolą typów?
(added the definition of polymorphism thanks to Kemberli Jennings)
- [22.5] How do you define a copy constructor or assignment
operator for a class that contains a pointer to a (abstract) base class?
(fixed Circle and Square so they inherit from Shape thanks to Paul Campbell)
- [32.1] Is the type of "pointer-to-member-function"
different from "pointer-to-function"?
(changed "It's type is..." to "Its type is..." thanks to Graham Borland)
- [33.4] How can I insert/access/change elements from a linked
list/hashtable/etc?
(reworded first 4 paragraphs thanks to Stan Brown)
- [35.2] Where can I get more information on using MFC and Visual C++?
(updated the URL thanks to Katy Mulvey; changed the maintainer's name thanks to AllanW)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(changed the URL for Watcom C++ thanks to Stephen Howe; added Comeau C++ thanks to Greg Comeau)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.11] Co nowego w wersji 10/99 ?
New FAQs:
Changed FAQs:
- [6.11] Czy C++ jest standaryzowany?
(zmienione "International Standards Organization" na "International Organization for Standardization" podziękowania savvysoft2@aol.com)
- [7.1] Co to jest klasa?
(treść została poprawiona tak, aby nie sugerować, że int jest "klasą", dziękuję za uwagę Ron Natalie)
- [8.1] Co to jest referencja?
(dodano typ zwracany przez funkcję main())
- [8.2] Co się stanie, jeśli przypisze się wartość referencji?
(dodano słowo "stan" aby uniknąć niejaśności, dziękuję za spostrzeżenie Donna)
- [8.3] Co się stanie, jeśli funkcja zwróci referencję?
(dodano typ zwracany przez main())
- [10.5] Który konstruktor zostanie wywołany, jeśli
utworzę tablicę obiektów klasy Fred?
(dodany typ wartości zwracanej przez main(), ponadto dopisano co nieco o "jawnej inicjalizacji elementów tablic", dziękuję za uwagi Keller Beyer)
- [10.8] Co to są "nazwane konstruktory" (ang. "Named Constructor Idiom")?
(dodano typ wartości zwracanej przez main())
- [12.1] Co to jest pseudo-przypisanie [ang. self-assignment] ?
(dodany typ return do main())
- [13.4] Przeciążanie operatora sprawia, że moja klasa
wygląda koszmarnie; nie można jakoś poprawić przejrzystości kodu?
(added return type to main())
- [13.5] Jakie operatory mogą a jakie nie mogą być przeciążane?
(added return type to main())
- [13.6] Mogę przeciążyć operator==
tak aby pozwolił mi porównać dwie char[] używając porównania łańcuchów?
(replaced "class type" with "user-defined type" in first paragraph thanks to Daryle Walker)
- [13.8] Jak stworzyć operator indeksu dla klasy Matrix?
(added return type to main(); added parameters to the instantiation of m in main() thanks to Boris Pulatov)
- [13.10] Should I design my classes from the outside
(interfaces first) or from the inside (data first)?
(added an admonition to not "roll your own" container classes)
- [15.2] Dlaczego mój program wpada w nieskończoną pętlę za
każdym razem, gdy użytkownik wpisze niewłaściwy znak?
(added return type to main())
- [15.4] Dlaczego mój program próbuje odczytać dane za końcem
pliku?
(strengthened the message with another example)
- [15.7] W jaki sposób mogę umożliwić
wyświetlanie/drukowanie/wysyłanie/zapisywanie mojej klasy Fred?
(added return type to main())
- [15.9] W jaki sposób mogę umożliwić pobieranie ze strumienia
obiektów mojej klasy Fred?
(added return type to main())
- [15.17] Dlaczego nie mogę otworzyć pliku znajdującego
się w innym katalogu, jak na przykład "..\test.dat"?
(added return type to main())
- [16.6] W jaki sposób mogę przekonać mój (stary)
kompilator, aby automatycznie sprawdzał, czy operator new nie zwrócił
wskaźnika NULL?
(added return type to main())
- [16.20] W jaki sposób zmusić klasę, aby jej obiekty
można było tworzyć wyłącznie przy użyciu operatora new, a nie deklarując je jako
zmienne lokalne lub statyczne?
(added return type to main())
- [18.12] Why does the compiler allow me to change an int after
I've pointed at it with a const int*?
(added return type to main())
- [18.13] Does "const Fred* p" mean that *p
can't change?
(added return type to main())
- [21.2] Derived* > Base* works OK; why doesn't
Derived** > Base** work?
(added return type to main(); added methods openGasCap() and fireNuclearMissle() makes the example more exciting)
- [21.4] Is an array of Derived a kind-of array of Base?
(added return type to main())
- [24.4] Should I pointer-cast from a private
derived class to its base class?
(changed PrivateDer to PrivatelyDer in last paragraph)
- [24.6] What are the access rules with private
and protected inheritance?
(rewritten with the using syntax; thanks to Stephen Vance)
- [28.16] Why is floating point so inaccurate? Why doesn't this
print 0.43?
(added return type to main())
- [31.2] How can I include a standard C header file in my C++
code?
(added return type to main())
- [31.3] How can I include a non-system C header file in
my C++ code?
(added return type to main())
- [31.4] How can I modify my own C header files so it's
easier to #include them in C++ code?
(added return type to main())
- [31.5] How can I call a non-system C function f(int,char,float)
from my C++ code?
(added return type to main())
- [32.2] How do I pass a pointer to member function to a signal
handler, X event callback, etc?
(added return type to main())
- [33.2] How can I make a perl-like associative array in
C++?
(added return type to main())
- [33.6] What's the syntax / semantics for a "class template"?
(added return type to main())
- [33.7] What's the syntax / semantics for a "function template"?
(added return type to main())
- [35.1] Where can I download a free C++ compiler?
(fixed the URL)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(added Edison Design Group C++ thanks to Matt Page)
- [37.3] Are there any pretty-printers that reformat C++ source
code?
(added Artistic Style thanks to Philipp Berndt, fixed the URL for C++2LaTeX thanks to Vinay Kumar Nallamothu, fixed the URL for C-Clearly thanks to Bill Robertson; fixed the plaintext version (the "grind" definition didn't show up there) thanks to Nimrod Zimerman)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.12] Co nowego w wersji 07/99 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.13] Co nowego w wersji 06/98 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.14] Co nowego w wersji 05/98 ?
Global changes:
- Usunięty szary kolor tła w wersji HTML. Tło można teraz określić
za pomocą opcji przeglądarki.
New FAQs:
Changed FAQs:
- [2.2] Jak mogę otrzymać kopię C++ FAQ
Lite w postaci plików HTML, tak żebym mógł czytać je off-line?
(jaśniejsze wyjaśnienie dlaczego nie ma adresu FTP lub HTTP z którego można pobrać FAQ)
- [2.3] Jak mogę otrzymać kopię C++ FAQ Lite w wersji
tekstowej, tak żebym mógł je czytać off-line?
(jaśniejsza odpowiedź dlaczego nie ma możliwości pobirania FAQ przez FTP lub HTTP)
- [6.11] Czy C++ jest standaryzowany?
(przepisane - teraz standard jest tutaj)
- [6.12] Gdzie mogę dostać kopię standardu ANSI/ISO C++?
(rewrote now that the standard is here)
- [16.17] Ale klasa Matrix z poprzedniego faqa
współpracuje tylko z klasą Fred! Czy nie da się zrobić tej klasy tak,
aby była bardziej uniwersalna?
(fixed Matrix's ctor thanks to Dhavide Aruliah)
- [16.22] W jaki sposób mogę wprowadzić licznik odniesień typu
"copy-on-write"?
(fixed Fred's default ctor thanks to Scott Harris)
- [34.3] How can I find a Fred object in an STL
container of Fred* such as std::vector<Fred*>?
(changed operator==() to operator()() thanks to Ali Tajeldin)
- [34.4] Where can I get help on how to use STL?
(added the URL for the STL FAQ)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(corrected the URL for Borland C++ & HP C++; added GNU C++, Intel Reference C++, KAI C++, and Portland Group C++)
- [37.3] Are there any pretty-printers that reformat C++ source
code?
(added a URL for "GNU indent")
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.15] Co nowego w wersji 09/97 ?
New FAQs:
Changed FAQs:
- [1.3] Warunki kopiowania
(ujednolicone)
- [5.1] Co oznacza akronim IMHO? (lub IMO, IMNSHO, FWIW, OTOH, etc.)?
(added silly acronym-laden comment at the bottom (adapted from e-mail from Erik Corry)
- [16.16] Ale kod w poprzednim faqu jest taki skomplikowany i
podatny na błędy! Nie ma jakiegoś prostszego sposobu na to?
(fixed some inconsistencies between FredMatrix and Matrix thanks to Jeff Baker)
- [16.21] W jaki sposób mogę wprowadzić prosty licznik odniesień
[ang. reference counting] ?
(fixed FredPtr's constructor thanks to Chichiang Wan)
- [23.6] What's the meaning of, Warning: Derived::f(float) hides Base::f(int)?
(rewritten with the using syntax; thanks to Matt Seitz)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(corrected the URL for Symantec C++ thanks to Michel Joly de Lotbiniere and added the URL for HP C++ thanks to David Green)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(corrected the URL for Microsoft Visual C++ thanks to Leila Rannanjarvi, and added the URL for Sun C++ thanks to Aryan Mirsepassi)
- [37.3] Are there any pretty-printers that reformat C++ source
code?
(added information about tgrind)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.16] Co nowego w wersji 01/97 ?
Global changes:
- Dodana (najbardziej oczekiwana!) opcja pobierania
jednym kliknięciem. Dzięki temu atomagicznie dostajesz kopię całego FAQ,
tak więc możesz przeglądać je off-line. Jest także podobna opcja pobierania FAQ w wersji tekstwej.
- Usunięte te denerwujące (pesky) liczniki odsłon dla każdej podstrony HTML.
- Dodane linki następne/poprzednie zaraz po każdym faq.
- Dodana bardziej rozbudowana nawigacja na dole każdej strony.
- Zmieniona nazwa sekcji [6]
"Management Issues" na "Big Picture Issues."
New FAQs:
Changed FAQs:
- [1.3] Warunki kopiowania
(uproszczone)
- [2.1] Najbliższy mirror z tym dokumentem.
(usunięty mirror "USA-2")
- [2.2] Jak mogę otrzymać kopię C++ FAQ
Lite w postaci plików HTML, tak żebym mógł czytać je off-line?
(przepisana i dodana opcja pobierania jednym kliknięciem: .zip, .tar.Z lub .tar.gz format)
- [2.3] Jak mogę otrzymać kopię C++ FAQ Lite w wersji
tekstowej, tak żebym mógł je czytać off-line?
(przepisane i dodana opcja pobierania jednym kliknięciem formatu .zip, .tar.Z lub .tar.gz)
- [5.1] Co oznacza akronim IMHO? (lub IMO, IMNSHO, FWIW, OTOH, etc.)?
(dodany KUTGW (podziękowania: Bengt Richter))
- [15.7] W jaki sposób mogę umożliwić
wyświetlanie/drukowanie/wysyłanie/zapisywanie mojej klasy Fred?
(added note about cascading operator<< calls)
- [15.9] W jaki sposób mogę umożliwić pobieranie ze strumienia
obiektów mojej klasy Fred?
(added note about cascading operator<< calls)
- [16.6] W jaki sposób mogę przekonać mój (stary)
kompilator, aby automatycznie sprawdzał, czy operator new nie zwrócił
wskaźnika NULL?
(fixed bugs: new handlers don't take arguments, thanks to Scott Aaron; changed set_new_hanlder to set_new_handler, thanks to Peter Andersson)
- [16.15] Jak, przy użyciu operatora new, mogę alokować tablicę
wielowymiarową?
(rewritten and expanded with a rectangular-matrix case)
- [18.1] What is "const correctness"?
(rewrote because of helpful feedback from Nor Jaidi)
- [21.6] Is a Circle a kind-of an Ellipse?
(added a caveat that setSize(x,y) isn't sacred)
- [21.7] Are there other options to the "Circle is/isnot
kind-of Ellipse" dilemma?
(added a caveat that setSize(x,y) isn't sacred)
- [21.8] But I have a Ph.D. in Mathematics, and I'm
sure a Circle is a kind of an Ellipse! Does this mean Marshall Cline
is stupid? Or that C++ is stupid? Or that OO is stupid?
(added a caveat that setSize(x,y) isn't sacred)
- [23.3] When my base class's constructor calls a
virtual function on its this object, why doesn't my derived class's
override of that virtual function get invoked?
(rewrote)
- [31.8] How can I pass an object of a C++ class to/from a C
function?
(added #ifndef FRED_H / #define FRED_H to code)
- [35.5] Where can I get information about the C++ compiler
from {Borland, IBM, Microsoft, Sun, etc.}?
(added HP C++)
- [37.5] Where can I get OS-specific questions answered (e.g.,
BC++, DOS, Windows, etc)?
(added Borland C++ URLs thanks to Simon Edlund)
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.17] Co nowego w wersji 11/96 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.18] Co nowego w wersji 10/96 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.19] Co nowego w wersji 09/96 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.20] Co nowego w wersji 08/96 ?
Global changes:
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.21] Co nowego w wersji 07/96 ?
Global changes:
New FAQs:
- [4.21] Co nowego w wersji 07/96 ?
- [5.5] Co robić jeśli ktoś inny zadaje pytanie, na które
odpowiedź znajduje się już w FAQ?
- [5.7] Jak dobrze zatytułować list na grupę?
- [6.8] Czy "wirtualne" funkcje (wiązanie dynamiczne) są
podstawą OO/C++?
- [6.9] Jestem z Missouri. Dlaczego "wirtualne"
funkcje (dynamiczne wiązanie) stanowią taką dużą różnicę?
- [7.6] W jaki sposób mogę uniemożliwić innym programistom podglądanie "prywatnych" fragmentów mojej klasy?
- [7.7] Czy enkapsulacja chroni jakoś program w systemie operacyjnym przed innymi?
- [10.4] Czy domyślnym konstruktorem dla klasy Fred jest zawsze
Fred::Fred()?
- [10.5] Który konstruktor zostanie wywołany, jeśli
utworzę tablicę obiektów klasy Fred?
- [10.8] Co to są "nazwane konstruktory" (ang. "Named Constructor Idiom")?
- [10.9] Dlaczego nie mogę zainicjować składowych statycznych w liście inicjującej konstruktora?
- [11.2] W jakiej kolejności obiekty podlegają destrukcji?
- [11.3] W jakiej kolejności podlegają destrukcji obiekty
wewnątrz tablicy?
- [11.4] Czy mogę przeciążyć destruktor zdefiniowanej przeze
mnie klasy?
- [11.5] Czy powinienem(-nam) jawnie wywoływać destruktor
dla zmiennej lokalnej?
- [11.6] Co zrobić w sytuacji, gdy chcę "ubić"
lokalny obiekt przed końcem bloku, w którym jest on zdefiniowany (przed
znakiem })? Czy mogę jawnie wywołać destruktor lokalnego obiektu jeśli
naprawdę tego potrzebuję?
- [11.7] W porządku: nie będę
wywoływał(a) destruktora jawnie; ale w takim razie jak rozwiązać powyższy
problem?
- [11.8] Co mam zrobić, jeśli nie mogę
umieścić obiektu w takim "sztucznym" bloku?
- [11.9] Czy mogę jawnie wywołać destruktor w
przypadku obiektu alokowanego operatorem new?
- [11.10] Co to jest "placement new" i do czego można go użyć?
- [11.11] Czy, gdy piszę destruktor, muszę jawnie wywoływać
destruktory pól składowych mojej klasy?
- [13.6] Mogę przeciążyć operator==
tak aby pozwolił mi porównać dwie char[] używając porównania łańcuchów?
- [13.8] Jak stworzyć operator indeksu dla klasy Matrix?
- [13.10] Should I design my classes from the outside
(interfaces first) or from the inside (data first)?
- [15.9] W jaki sposób mogę umożliwić pobieranie ze strumienia
obiektów mojej klasy Fred?
- [16.5] Czy przy każdym użyciu operatora new muszę
sprawdzać, czy nie zwrócił on wartości NULL?
- [16.6] W jaki sposób mogę przekonać mój (stary)
kompilator, aby automatycznie sprawdzał, czy operator new nie zwrócił
wskaźnika NULL?
- [16.7] Czy przed instrukcją delete p musze sprawdzać, czy
wskaźnik nie jest równy NULL ?
- [16.8] Z jakich etapów składa się wykonanie instrukcji
delete p?
- [16.9] Czy w instrukcji p = new Fred()
może nastąpić "wyciek pamięci", jeśli konstruktor klasy Fred rzuci wyjątek?
- [16.12] Czy mogę opuścić nawiasy [] w operatorze
delete, gdy chcę skasować tablicę obiektów typu prostego (np. char,
int)?
- [16.13] Mam tablicę alokowaną przy użyciu instrukcji p = new Fred[n]. Skąd kompilator wie, podczas jej kasowania instrukcją
delete[] p, że znajduje się w niej n obiektów?
- [16.21] W jaki sposób mogę wprowadzić prosty licznik odniesień
[ang. reference counting] ?
- [16.22] W jaki sposób mogę wprowadzić licznik odniesień typu
"copy-on-write"?
- [16.23] W jaki sposób mogę wprowadzić licznik
odniesień typu "copy-on-write" dla całej hierarchii klas ?
- [17.5] How do I change the string-length of an array of
char to prevent memory leaks even if/when someone throws an exception?
- [18.12] Why does the compiler allow me to change an int after
I've pointed at it with a const int*?
- [22.5] How do you define a copy constructor or assignment
operator for a class that contains a pointer to a (abstract) base class?
- [23.7] What does it mean that the "virtual table" is an
unresolved external?
- [26.11] Which is better: identifier names
that_look_like_this or identifier names thatLookLikeThis?
(with the help of James Robinson)
- [31.1] What do I need to know when mixing C and C++ code?
- [32.5] How can I avoid syntax errors when calling a member
function using a pointer-to-member-function?
- [33.2] How can I make a perl-like associative array in
C++?
- [34.3] How can I find a Fred object in an STL
container of Fred* such as std::vector<Fred*>?
- [34.9] Where can I get tons and tons of more information on C++
class libraries?
- [35.7] How do compilers use "over-allocation"
to remember the number of elements in an allocated array?
- [35.8] How do compilers use an "associative
array" to remember the number of elements in an allocated array?
- [36.4] Why can't the compiler find my header file in
#include "c:\test.hpp" ?
- [36.5] What are the C++ scoping rules for for loops?
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.22] Co nowego w wersji 06/96 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.23] Co nowego w wersji 05/96 ?
Wszystko zaktualizowane. "Surowy" tekst przekształcony do HTML.
Zreorganizowane, przepisane, rozszerzone, dodany przykładowy kod, etc, etc.
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.24] Co nowego w wersji 04/96 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.25] Co nowego w wersji 03/96 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.26] Co nowego w wersji 09/95 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.27] Co nowego w wersji 06/95 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.28] Co nowego w wersji 04/95 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.29] Co nowego w wersji 03/95 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.30] Co nowego w wersji 01/95 ?
New FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.31] Co nowego w wersji 12/94 ?
New FAQs:
Changed FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.32] Co nowego w wersji 11/94 ?
New FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.33] Co nowego w wersji 08/94 ?
Przepisana większość odpowiedzi - generalne sprzątanie. Zmienione znaki cudzysłowu
na "..." zamiast `...' i/lub ``...''. Linie przykładów kodu poprzedza teraz jeden
znak tabulacji (żadne inne linie nie są poprzedzane tabem). Wszystko edytowane edited;
wszędzie dokonane mniejsze zmiany.
New FAQs:
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
[4.34] Jakie zmiany wprowadzono przed wersją 08/94?
Ten dokument został napisany w roku 1991. Nie dysponuję żadnymi zapiskami na temat
zmian wprowadzonych wcześniej niż 8/94.
[ Góra | Dół | Poprzednia sekcja | Następna sekcja | Szukaj w FAQ ]
E-mail the author
[ C++ FAQ Lite
| Spis treści
| Skorowidz
| O autorze
| ©
| Pobierz swoją własną kopię ]
Ostatnia aktualizacja Jun 17, 2002
Wersja polska: 0.1i Jul 13, 2004