1. Early vs late bindingEarly binding and late binding are concepts in programming that determine when the code is linked to the actual functions or methods it refers to.Early binding is also known as static binding or compile-time binding. In early binding, the compiler knows the type of the object being referred to, and the specific function or method to be called is determined at compile-time. This means that the code is linked to the function or method...
Showing posts with label Namespaces. Show all posts
Showing posts with label Namespaces. Show all posts
Wednesday, March 1, 2023
Tuesday, February 28, 2023
Short notes on 1. Namespaces 2. Exception handling 3. Basic functions of seekg(), seekp(), tellg(), tellp()
Niraj shrestha
February 28, 2023
0
1. Namespaces:Namespaces are a feature in C++ that allow us to group related functions, classes, and variables under a single name. This helps in preventing naming conflicts and organizing code. We can create a namespace using the keyword "namespace" followed by the namespace name and enclosing the contents within curly braces. We can access the contents of a namespace using the scope resolution operator "::". For example:namespace myNamespace { int...
Friday, February 17, 2023
Short notes on : 1. static data members and static member functions 2. This pointer 3. Namespaces
Niraj shrestha
February 17, 2023
0
1. Static data members and static member functions: Static data members and static member functions are used in C++ to create class variables and functions that are shared by all objects for the class. A static data member is a variable that is associated with the class, not with any individual object of that class. Similarly, a static member function is a function that is associated with the class and can be called without an object of...