Lecturer | Dr. Carsten Gutwenger |
Major | M.Sc. Automation & Robotics |
Course Number | 048014 |
Semester | First |
Type / SWS / CP | Lab course / 3 SWS / 3 CP |
Language | English |
I will publish news about this course (e.g. new stuff on the web site etc.) in my Google+ stream, shared with a particular circle of mine. If you want to follow this stream, I need to add you to this circle (otherwise you cannot see these news in your stream). Just send me an email.
The course takes place in the Retina pool, room P1-101-108b (Otto-Hahn-Str. 8).
In both groups Orwa Nassour will also be there as a tutor to help you.
The final exam takes place on January 31. Here you will find all relevant information:
The results of the final exam (Jan 31) can be found in this list. It shows the points per exercise (max. 1 point), the total points, and if you passed (at least 2 points) or failed. 70.6% have passed the exam (60 out of 85).
Here are the solutions to the final exams:
The second attempt took place on March 30, 14:00, in Otto-Hahn-Str. 14, room 104.
Qualified are all students who were qualified for the first attempt and failed or did not appear. The relevant topics are the same as for the first attempt.
The results of the second attempt (Mar 30) can be found in this list. It shows the points per exercise (max. 1 point), the total points, and if you passed (at least 2 points) or failed. 61.1% have passed the exam (11 out of 18).
H. Ahmed | S. Al-Rubaye | M. Alsayegh | D. Alshare | M. A. S. Alvi |
T. C. Arslan | A. Asad | S. M. M. Azher | V. Bangalore Nagendra | B. Bilgin |
P. Broujerdi | P. Dank | M. U. Ehsan | M. Elsharkawy | M. E. Er |
A. A. Farook | Y. Fisiha | S. K. Gajjala | H. Harnal | M. E. M. Hassan |
M. M. Ihsan | M. H. Iqbal | S. S. Kulkarni | N. Liu | H. Mahadevaiah |
A. Martinez Garcia | M. K. Mehmood | T. Mehta | L. Migdadi | M. Mohammadi Parsa |
Z. Nazir | M. Nejati | A. Oster | H. Patel | S. Patel |
S. Qa´adan | M. A. Saeed | N. Schafer | S. Sutradhar | M. Taghavi |
A. Tatulea Codrean | B. Tor | S. T. Turesay | S. Wan | C. Yildiz |
C. You |
A. Ahmad Yousuf | R. Aymaz | P. R. Bhat | S. Damodaran | D. Desai |
M. A. Galván Mendoza | S. Gopinathan Asari Sujatha | S. C. Govindasamy Ramamoorthy | V. Hariharan | A. Harur Manoharan |
V. Indalkar | R. Ismail | D. H. Jani | P. Khobkhun | A. Krishnaswamy Rangarajan |
W. Li | Y. Li | R. Marishettihally Basavarajappa | I. A. Marta | S. S. Mudda |
M. K. Murugaiah | M. Nandakumar | K. Narayanan | Q. Navid | M. Noman |
A. N. Patel | A. V. Patel | N. Patel | R. Patel | A. Pithadiya |
K. Radhakrishnan | B. Raja | S. Sandhu | V. Selvantarajan | N. Shaik |
P. Shen | S. Shete | M. R. Sukhadia | Y. Sun | S. Thennilapuram Subramanian |
V. Thota | A. Ul Jabbar | V. Vora |
In this course, you will learn
You will find here all the slides as well as assignment and exam sheets (including solutions for assignment sheets).
No | Date | Topics | Slides | Source Code |
---|---|---|---|---|
1 | Oct 11 | Welcome and Organization | slides | |
Creation of pool accounts | ||||
“Hello World!” project | hello_world.cpp | |||
2 | Oct 18 | Variables and Simple Control Structures | slides | |
Variables and assignments | ||||
Printing and reading data | reading_data.cpp | |||
if-else statements, while-loops | printing_numbers.cpp | |||
3 | Oct 25 | Loops and Strings | slides | |
do-while- and for-loops | sum_up.cpp | |||
break and continue | ||||
C++ strings and the bool data type | ||||
Output formatting with manipulators | formatting_output.cpp | |||
4 | Nov 08 | Vectors and Scope | slides | |
Floating point numbers | printing_floats.cpp | |||
Increment and decrement operators | pre_vs_post.cpp | |||
C++ vectors | vectors.cpp fib_vectors.cpp sort_vector.cpp | |||
Scope and lifetime of variables | nested_scope.cpp | |||
5 | Nov 15 | File I/O and Maps | slides | |
File I/O and characters | reading_file.cpp writing_file.cpp | |||
C++ maps | maps.cpp | |||
Type definitions, constants | ||||
Types of integers and the sizeof operator | sizeof.cpp | |||
6 | Nov 22 | Functions and References | slides | |
Functions | power.cpp nested_calls.cpp flow_of_control.cpp | |||
References | swap.cpp print_vector.cpp | |||
switch statements | switch.cpp | |||
7 | Nov 29 | Function Overloading | slides | |
Type Conversion | ||||
Comma Operator | comma.cpp | |||
Function overloading | overloading_max.cpp overloading_print.cpp | |||
8 | Dec 06 | Custom Types | slides | |
Structures | ||||
Operator overloading | point.cpp | |||
9 | Dec 13 | Access Control and Inheritance | slides | |
public and private | ||||
Inheritance | employee.cpp | |||
Class Hierarchies | hierarchy.cpp | |||
10 | Dec 20 | Pointers and Polymorphism | slides | |
Constructors, destructors and assignment | ||||
Pointers | ||||
Virtual and pure virtual functions | redefine.cpp virtual.cpp draw.cpp | |||
11 | Jan 10 | Memory Management | slides | |
Static and global variables | static.cpp global.cpp | |||
Static data members | static_data_members.cpp | |||
Dynamic memory allocation | slist.cpp | |||
12 | Jan 17 | How to debug programs with Visual Studio | slides | |
13 | Jan 24 | Smart pointers and Function Objects | slides | |
Smart pointers | unique_ptr.cpp shared_ptr.cpp | |||
Function objects | functor.cpp sort.cpp is_odd.cpp |
For the topics we consider in the last two lectures, there was a voting on Google+.
No | Date | Sheet | Additional Files and Solutions |
---|---|---|---|
1 | Oct 18 | sheet 01 | solution_1_1.cpp solution_1_2.cpp solution_1_3.cpp solution_1_4.cpp solution_1_5.cpp |
2 | Oct 25 | sheet 02 | solution_2_1.cpp solution_2_2.cpp solution_2_3.cpp |
3 | Nov 08 | sheet 03 | solution_3_1.cpp solution_3_2.cpp solution_3_3.cpp solution_3_4.cpp |
4 | Nov 15 | sheet 04 | desiredsignal.txt measuredsignal.txt words.txt grades.txt |
solution_4_1.cpp solution_4_2.cpp solution_4_3.cpp solution_4_4.cpp | |||
5 | Nov 22 | sheet 05 | solution_5_1.cpp solution_5_2.cpp solution_5_3.cpp |
6 | Nov 29 | sheet 06 | solution_6_1.cpp solution_6_2.cpp solution_6_3.cpp solution_6_4.cpp |
7 | Dec 06 | sheet 07 | solution_7_1.cpp solution_7_2.cpp exercise_7_3.zip |
8 | Dec 13 | sheet 08 | solution_8_1.cpp solution_8_2.cpp |
9 | Dec 20 | sheet 09 | solution_9_1.cpp solution_9_2.cpp solution_9_3.cpp |
10 | Jan 10 | sheet 10 | solution_10_1.cpp solution_10_2.cpp solution_10_3.cpp |
11 | Jan 17 | sheet 11 | |
12 | Jan 24 | sheet 12 |
No | Date | Due | Sheet | Solutions |
---|---|---|---|---|
1 | Oct 25 | Nov 08 | exam sheet 1 | |
2 | Nov 22 | Nov 29 | exam sheet 2 | |
3 | Dec 13 | Dec 20 | exam sheet 3 | exam_3_1.cpp exam_3_2.cpp exam_3_3.cpp |
4 | Jan 17 | Jan 24 | exam sheet 4 | exam_4_1.cpp exam_4_2.cpp exam_4_3.cpp |
When using Visual Studio on the Retina pool computers, there are some problems occurring quite frequently. Here, I describe some of them along with solutions to fix them.
This might result in a setup of the development environment that is not the best for C++ projects. These settings affect many parts of the development environment, including window layout, menus, and shortcuts. In order to reset your current settings to the recommended “Visual C++ Development Settings”, proceed as follows (see also MSDN Help):
This warning appears, when Visual Studio tries to set the current path to the directory in which your project lies. If this fails, this warning appears and the current path is set to some default (the Windows directory I guess). The program, however, is started and works fine. This warning message is annoying, but you only have a problem if, e.g, you want to load and store files and assume these files are located in your project directory (without using a full path name).
The source of this problem is that your home directory is mounted as a network share, and by default a path name starting with “//pool-server03.retina...”
is used as the directory, in which your project directory is placed. You can simply fix this problem by changing this path name when you create a project. Use the drive letter R: which refers to your home directory, so use a path name that starts with R:\Visual Studio 2008\Projects
.
This error occurs occasionally, when you build your program in Debug configuration (which is the default). It does not occur in Release configuration.
The problem seems again be caused by the fact that home directories are mounted as network shares. A fix that seems to work is to disable incremental linking. You can do this as follows (see also MSDN Help):
If you do this, you will get a warning when building your program which tells you that Edit and Continue is enabled but incremental linking is disabled. You can then switch off Edit and Continue as follows (see also MSDN Help):
When you work on an assignment / exam sheet, you have to write many little programs, so the question arises how to do this task with the least effort.
When you create a new project as explained in the first lecture, you actually will create a new solution with a new project. You can see all the items in the currently open solution with the solution explorer (showing an explorer-like tree-view). In fact you can have several projects (programs) within one solution, so there is no need to create a new solution for every little program. To add a new project to the currently open solution, proceed as follows (see also MSDN Help):
Once you have several projects in a solution, you will realize that always one project is shown in bold face. This project is the program that will be started when you select Start or Start without Debugging from the menu. If you want to have a different project as start-up project, right click on the project and select Set as StartUp Project (see also MSDN Help).
If you accidentally choose Win32 Application instead of Win32 Console Application as project type, you will get a compiler error about an undefined WinMain function. Instead of creating a whole new project, it suffices to change one linker option:
If you use both Debug and Release configurations, you have to change it for both configurations.
My posts on Google+ about this course are marked with #cgOOP. You must be logged in to see the posts.
vector<int>
: vector_in_out.cpp