Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / help / c++.help
blob9e47b1df895ce37634e8a6d5ea37ef73ee5c39bb
1 # $NetBSD$
3 # This file contains typical error messages from C++ compilers and
4 # instructions how to fix them properly.
6 # === ISO C++ forbits declaration of '%s' with no type ===
8 # This g++ error message appears when a variable is declared, but the
9 # type of the variable has not been defined before.
11 # A common cause is that the type has been "declared" implicitly in a
12 # friend declaration of a class. Up to g++3, this friend declaration
13 # was also an implicit class declaration. Starting with g++4, this is no
14 # longer the case.
16 # Now you have to declare the friend class twice: Once to say that it is
17 # a class, and twice to say that it is a friend. Example:
19 # Wrong:
21 #       class Me {
22 #               friend class You;
23 #       };
25 #       You look_great;
27 # Correct:
29 #       class You;                      // <-- new
30 #       class Me {
31 #               friend class You;
32 #       };
34 #       You look_great;
36 # Keywords: ISO C++ forbids declaration type friend