| simplas2002 (22) | |
|
The abridged reference card is now in version 0.16. If someone wants to join in, please let me know. http://home.uevora.pt/~pmaa/cpp.pdf | |
|
|
|
| Bazzy (6281) | |
|
Small note: that document assumes that source files are *.cpp and headers *.h But there are many other possibilities ( eg: .cp .C .c++ .cc .cxx are interpreted as C++ sources by default on g++ ) | |
|
|
|
| simplas2002 (22) | |
|
Yes, I know, but it is impossible to put the whole 2003 norm document in a quick reference of the same size. There are many ingredients of C++ which were simply ignored since they aren't crucial. I bought many books (I have -or-read- all the classics) and none is nearly complete in terms of syntax. What I wrote is just the essential. How many people you know using .cp as extension? C++0x is mostly ignored (well, the auto keyword is there) since I was expecting for someone to help me. As for the Standard Library, another document must be written. P. | |
|
|
|
| Bazzy (6281) | |
|
The file naming is not part of the standard You can make your document more accurate if you omit the file extension ( such as in #include "<file>.h" ) .hpp is very common for headers file | |
|
|
|
| simplas2002 (22) | ||
|
I agree, just checked the widely available facsimile of the C++03 standard and already uploaded the modified text. As for .hpp, Stroustrup's TC++PL 3ed states that (pp 201-202)
| ||
|
Last edited on
|
||
| hamsterman (4327) | ||
| ||
|
|
||
| simplas2002 (22) | |||||
|
Well, obviously the if shouldn't be there.However, a declaration can invoke either the explicit or implicit form of copy constructor which can also be used for pre-defined types:
initiate with the same value and this is also allowed:
| |||||
|
|
|||||
| rstiltskin (5) | |||||
In section 1.1, the notation for options and the examples provided seem ambiguous. I don't think you meant that
For example, I can take that to mean that
const int x = (y) or const int x(y) or const int (x) or const (x) or (x) In other words,
| |||||
|
|
|||||
| simplas2002 (22) | |
| Version .17 (same link) has these issues solved. And more contents too. | |
|
|
|
| rstiltskin (5) | |
| No, I still don't see anything in the notation that says that the '=' is part of the expression to be replaced, i.e., that "= <expr>" is to be replaced by "(<expr>)" | |
|
|
|
| simplas2002 (22) | |
|
The space indicates that. It was after the "=" sign but is now in the correct position. I will insert a few syntax ingredients in the next revisions and further defects will be ironed out. It looks good, though, doesn't it? | |
|
Last edited on
|
|