Utility libraries in c++

initializer_listtemplate< class T >class initializer_list;https://en.cppreference.com/w/cpp/utility/initializer_list size returns the number of elements in the initializer list(public member function) begin returns a pointer to the first element(public member

Conversion in c++

static_castConverts between types using a combination of implicit and user-defined conversions dynamic_castSafely converts pointers and references to classes up, down, and sideways

Classes in c++ part 1

Class declaration Member specification Function definitions  Access specifiers Using-declarations member template declarations alias declarations local struct injected-class-name Non-static data members Member initialization

initialization in c++

Default initialization Value initialization T()new T ()Class::Class(…) : member() { … }T object {};T{}new T {}Class::Class(…) : member{} { … } Direct initialization T object ( arg );T object ( arg1, arg2, … ); T object { arg }; T ( other )T ( arg1, arg2, … ) static_cast< T >( other ) new T(args, …) Class::Class() : member(args, …) { … } [arg](){ … } Copy

Functions in c++

Function Pointer you can not cast non virtual function pointer you can cast virtual function pointer generic function pointer lambda expression [ captures ] ( params ) -> ret { body }[ captures ] ( params ) { body }[ captures ] { body } Function

Declarations in c++

Enum enum name { enumerator = constexpr , enumerator = constexpr , … } enum name : type { enumerator = constexpr , enumerator = constexpr , … } enum name : type ; Array Namespace Reference declaration forwarding Pointer pointer to object const pointer Syntax meaning const T* pointer to constant object

Supernode

The two nonreference nodes form supernode if the voltage source (dependent or independent) is connected between two nonreference nodes. As shown below