Category : header-files

In C++, since the namespace std contains the declaration of all standard library functions, then why do we need to include iostream header to use I/O functions. Can we not just write ‘using namespace std’ so that the compiler knows where to get the definition? I want to know the need for including a header ..

Read more

So I’ve learnt that it’s best to first declared function in header file, than define it in a seperate .cpp file as function definition within headers aren’t recommended. And I did so, with normal function and it worked. but when I try to do the same thing with template functions, it gave back error like ..

Read more

I am practicing using structs I am writing a C++ program that processes a list of resource transactions/ claims stored in a text file and answers query selected by a user. A transaction/claim states the amount of memory the process wants or can release Transactions are listed in chronological order (the oldest entry is at ..

Read more