When we should use virtual destructor?

Tuesday, January 25th, 2011  »  Posted By  »  Total 0 Comment

It is used whenever a base class pointer is pointing to its derived class. In such a case when a user tries to delete the base class pointer then it results in deallocating the memory occupied by the base class.Therefore instead the derived class getting destroyed the base class does. Now as the base class [...]

How to setup wordpress on localhost?

Wordpres provide database details Wednesday, January 19th, 2011  »  Posted By  »  Total 0 Comment

First you need to install Apache web server to run PHP and MySQL. XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start. Steps to install XAMPP Download from http://www.apachefriends.org/en/xampp-windows.html Extract the file and double click [...]

How to allocate two dimensional array?

Wednesday, January 19th, 2011  »  Posted By  »  Total 0 Comment

Consider if you want to allocate a two dimensional array: int a[10][3]; Then you have to allocate the rows first and then columns using for loops. Here is the C example code. int **a, x; //Allocate memory a = malloc(sizeof(int *) * 10); for(x = 0; x < 10; x ++) { a[x] = malloc(sizeof(int) [...]

How to select text vertically in vi/vim editor

Wednesday, January 19th, 2011  »  Posted By  »  Total 1 Comment

To select the text vertically first press escape if you are in insert mode. Then type: ^v (Control v) Then you can use arrow keys to select the text you want. After selecting the text use Delete to delete the text. y to copy the text p to paste the text

How to run PHP files on localhost?

Thursday, June 4th, 2009  »  Posted By  »  Total 0 Comment

To run any php file you need to install Apache web server on your localhost. Also you need to install MySQL server for any database programming. You can install these separately or there is easy way to achieve the same by installing XAMPP. XAMPP is an easy to install Apache distribution containing MySQL, PHP and [...]

What is PHP?

Thursday, June 4th, 2009  »  Posted By  »  Total 0 Comment

PHP stands for “Hypertext Preprocessor“,  is a server-side scripting language used to create dynamic Web pages. This can be embedded to HTML pages. This is very easy scripting language compare to other scripting languags. The goal of the language is to allow Web developers to write dynamically generated pages quickly. PHP supports many databases like [...]

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup