![]() |
.. (לתיקייה המכילה) | |
May we use auto and decltype keywords in our solution? | |
No. The exercise can be solved using only elements we learned in the lectures. While we leave you the freedom to independently learn and to use other elements of the language, that should not replace understanding and properly using the elements covered in class, which is unfortunately the case with the above. |
How to set and verify the new g++ version for the assignment? | |
In order to use gcc/g++/gfortran 4.7.1, you should run first: source /usr/local/gcc4.7/setup.csh # for CSH and TCSH or: . /usr/local/gcc4.7/setup.sh # for BASH and SH verify version by: gcc --version gcc (GCC) 4.7.1 Please note that this change will expire after you log out. Refer to tutorial #6 to see how to make this permanent. |
How do I get C++11 to work in Eclipse? | |
***Probably OLD solution::******** Eclipse handles most features of C++11, especially those which are required for the exercise. 1. Start by creating a new C++ project in Eclipse. 2. Add the -std=c++11 flag by going into Project | Properties | C/C++ Build. Choose C++ Compiler, Settings and add under miscellaneous "-std=c++11". This is almost identical to setting a C project to C99. 3. In addition, to make Eclipse understand C++11, go to Discovery Options (Also under C/C++ Build). Make sure "C++ Compiler" is chosen and under "Compiler invocation arguments" add "-std=c++11" in the end of this line (with a space before ti of course). ******************************** ::::::::::::If that's not working go to Project | Properties | C/C++ Build. Choose C++ Compiler, then Dialect then Language standart and change it to ISO C++11 It should be enough in new eclipse! |
We did not understand what do we need to do in the assignment | |
1. Write a C++ wrapper for your existing C set container (do not re-implement it). 2. Re-implement the rest of the system in C++ |
mtm_ex4.h contains typedefs from exercise 2 | |
See comment in the header. |
The linker complains that MTM_MAX_LINE_LENGTH is nowhere to be found | |
MTM_MAX_LINE_LENGTH is defined as a global (constant) object. As such, its constructor needs to be explicitly called in exactly one translation unit. For this reason, it needs to be declared as extern. Additionally, a file mtm_ex4.cpp was added with the definition of the constant. |
In mtm::set, what is the difference between: | |
In the case of a set, there is no difference, since both return const_iterator. Both versions are needed for STL compatibility. Same for end, cend. |