C++

C Programming – Dealing with files – How to use open function to open a file?

We have discussed that ‘C’ provides buffered and un-buffered functions for file management. We have already discussed some of the buffered functions in our previous articles; “C Programming – Dealing with files – How to read from a file?“, “C Programming – Dealing with files – How to write to the file?” and “C Programming – Dealing […]

C Programming – Dealing with files – How to read from a file?

C library provides good number of file handling functions to deal with files and directories / folders. Generally we can classify these functions as: Buffered functions and Un-buffered functions. Un-buffered functions are the raw functions deals directly with storage devices. Whereas, buffered functions maintains memory buffers to improve the performance and reduce the number of […]

C++ – Operator Overloading

One of the beautiful feature of ‘C++’ is it’s ability to support Operator Overloading. ‘C++’ Operator Overloading allows to change the behavior of operators when using them with ‘C++’ class objects. One of the best example of Operator Overloading is ‘+’ operator. Usually ‘+’ operator will add two integer operands and produce an integer result. […]

C++: Templates

C++ Templates are used for writing generic programming. C++ allows to define function templates and class templates. In C++, we use template keyword to write generic programming. The syntax of the template declaration starts with template<class T> Where template is the keyword which indicates the particular function or class is a generic function or class. Here […]

COM – Creating a COM Component using C++ – IClassFactory implementation

CoCreateInstance depends on IClassFactory to create class instances. We have looked into IClassFactory‘s methods and we have implemented these methods in our previous article. Let’s include IClassFactory‘s implementation into our HelloComponent. We already have HelloComponent‘s declaration in the “HelloComponent.h” file and its implementation in the “HelloComponent.cpp” file. In the same way, we will add the IClassFactory […]

Scroll to top