• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/10

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

10 Cards in this Set

  • Front
  • Back

opaque data type

in c you typedef a type and hide its implementation to the users



you should be able to pass thiz objecf around but wont ne able to refer to a subobject inside



this allows one to change the implementation if needed



typedef struct zhash *zhasht


typedef zhasht myhash




myhasht foo ();



caller can


myhasht a = foo()



i don't reallg like hiding the pointer into a typedef...




ompd is a prime example






errno handling

need to read upon this

c standard runtime library call

typically return -1 or NULL to indicate and error cindtion



and set errno so that caller can do perror or strerror(errno)


c++ type casting

static_cast


dynamic_cast


reinterprete_cast



upcast is always safe


downcast is inlu safe with dynamic_cast


reinterprete_cast hammer this can be used in void*



C cast is similar to combining static and dynamic thkugb not encourages

how a c++ object constructex

from base constructor to derive constructor



desruction from derive to base




multiple bases left most



members in sequence

templates

fancy m4


compilers have hard time to instantiate for which types a class needs to be parameterized


typically the body is defined in the header


so when the template is instantiated you know which body is needed



this can lead to large numbers of duplicates...!

comdat support

turns out to be not helpful


doesnt work for templated methods..

template concept

a concept is a set of requirements a template parameter must comply with

generic programming

polyporphism based in templates

value_type and traits class

a typedef defined within a class



a traits class is a adapter class that allows one to use value_type on a wider range of classes and native types through template specialization