Skip to main content
UCLA

Program In Computing

PIC 10C: Advanced Programming

About

In this C++ course, a variety of more advanced topics are chosen by the instructor. Topics may include advanced data structures like red-black trees, function templates and class templates, metaprogramming, threading, the command line, and version control.

Course Description

Lecture, three hours. Advanced topics making use of C++; modern features of C++; template metaprogramming; more advanced algorithms and data structuring techniques; the command line; other topics at the discretion of the instructor such as file systems, program design and version control, graphics, code parallelization and simulation. P/NP or letter grading.

Possible Topics

PIC Director, Michael Andrews once made the mistake of trying to cover all of the following topics. Instructors are advised to be less ambitious, but what follows describes in more detail some topics that might be covered.

topics from 10B

  • pointers, encapsulation, recursion
  • l- and r-values, std::move
  • copy/move constructors/assignment operators, destructors
  • nested classes, friend keyword, namespaces
  • iterators, operator*, operator->

the command line

  • common Linux commands
  • g++, compilation, and linking
  • different versions of C++
  • makefile
  • command line arguments

advanced data structures

  • red-black trees
  • deques
  • others at the discretion of the instructor

templates

  • class templates, partially specialized, fully specialized
  • default template values, setting policy
  • function templates, overloading, not partially specializing
  • forwarding references, reference collapsing rules, std::forward, deduction guides
  • decltype, std::declval, variadic templates

metaprogramming

  • metafunctions, the typename keyword, ::type
  • std::is_floating_point, std::is_same
  • transformations: std::remove_reference, std::remove_const
  • SFINAE (substitution failure is not an error), std::enable_if
some of this content may be sacrificed in order to dedicate more time to data structures

other useful features of the language

  • bit operations, std::byte, CHAR_BIT
  • smart pointers like std::unique_ptr
  • lambdas

file management

  • <filesystem>, paths, directory_iterators
  • fstreams, operator>>, get, getline, tellg, seekg, read
  • longest common subsequence algorithm

threading

  • std::thread, join, detach
  • std::ref
  • race conditions, std::mutexes, std::atomic

program design and version control

graphics

Expected Grade Scheme and Homework Assignments

PIC 10C instructors are required to assign at least four homework assignments.