RUVIDEO
Поделитесь видео 🙏

CS204 - Advanced Programming - Week 2 [1/2] - STATIC LIBRARIES, PREPROCESSING, ASSERT CLAUSES IN C+

SAMPLE CODES:
1) taps: this folder contains .cpp and header files of some classes. We are expected to construct a static library in this example. In order to create a static library, you should create a project accordingly. The necessary information about how a static library is constructed and used are in the 55th slide of the .ppt file '1-intro-preprocessor.ppt' under lecture notes. Please let the students open the project and create static library in the class according to the slide. The output (.lib) should be inside Debug or Release folder depending on whichever mode you used to build the project.

2) arraysLibrary: This example is about how to use .lib file that you constructed in the previous example. The arraysLibrary folder contains main.cpp file and the header file that is required in main.cpp. These header files are the ones that were also used in the previous example. In this example, you should create a project and add main.cpp, header files and the .lib file that you constructed in the previous example. Since we add the .lib file to the project, we do not add .cpp files that contain implementations of the header files.

There is one important thing here; you should run the program in the same mode (debug or release) that you've built the .lib file.

In the main.cpp, there are some compiler directives. The program creates array or vector depending on the ARRAY is defined or not. You should also mention this in recitations.

Also a header guard example is shown. In order to do this, comment out the header guard in dice.h (the line "#ifndef _DICE_H" and the line #endif at the very end). The lines to be commented out are indicated in the file. Later, uncomment the #include "dice.h" line in date.h. Once you try to compile, you will get a multiple declaration error because while dice.h and date.h are already included in main.cpp, dice.h is included one more time in date.h. When you add header guard back, you can compile smoothly.

3) assertExample: Create a new project using the files in this folder. The buggyDice file is very similar to the dice in the previous example with one exception: the roll function returns numbers in the range 0-6, not 1-6. There is an assertion that checks whether the value returned from the Roll function is equal to 0 (zero) or not. If you run the program in Debug mode, the program is going to abort when the Roll returns 0 (zero). You can verify this by looking at the current roll value that is printed to the screen. Since the assertion executes only in the Debug mode, the program does not abort in the Release mode even if the Roll function returns 0 (zeros). Please run the program in both Debug and Release mode and show the difference.

SAMPLE CODES AVAILABLE AT:
http://people.sabanciuniv.edu/levi/cs204/CS204Lab2.zip

DISCLAIMER:
(i) we do not promise any completeness,
(ii) we do not promise any promptness (i.e. some weeks may be skipped, may be late),
(iii) we do not aim to replace these videos with the actual labs.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «CS204 - Advanced Programming - Week 2 [1/2] - STATIC LIBRARIES, PREPROCESSING, ASSERT CLAUSES IN C+», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.