<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>C/C++ Coder</title><description></description><managingEditor>noreply@blogger.com (renlabs)</managingEditor><pubDate>Tue, 10 Sep 2024 21:36:36 -0700</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">21</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://cppcoder.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>List View Item Control.</title><link>http://cppcoder.blogspot.com/2008/11/list-view-item-control.html</link><category>controls</category><category>List View</category><author>noreply@blogger.com (renlabs)</author><pubDate>Wed, 5 Nov 2008 21:45:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-6823741780780134151</guid><description>List View Item Control.Here is a sample listing of code that will add bitmap IDs(win32 application) or ICON Ids to the list view control. few month back I made this to add a feature to my existing application module.You cannot blindly add this to ur workspace since it need some modifications. Treat this as a code snippet or an example to make the target.!! Happy coding/**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Sudoku Solver</title><link>http://cppcoder.blogspot.com/2008/07/sudoku-solver.html</link><category>Sudoku Solver</category><author>noreply@blogger.com (renlabs)</author><pubDate>Wed, 9 Jul 2008 23:42:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-7537507750462076524</guid><description>/**********************************­ ***************************** Dipl.- Inf. Detlef Hafer*** D-91058 Erlangen (Germany)**********************************­ ***************************/#include "stdio.h&gt;"#include "stdlib.h"#include "string.h"#define BACK -1#define FORWARD 1#define NSIZE 9#define BOOL bool#define FALSE false#define TRUE trueint F[NSIZE][NSIZE];#if _DEBUGstatic int M[NSIZE][NSIZE] </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Virtual Table</title><link>http://cppcoder.blogspot.com/2008/04/virtual-table.html</link><category>Virtual Table</category><category>Vtable</category><author>noreply@blogger.com (renlabs)</author><pubDate>Wed, 16 Apr 2008 02:59:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-289382328795856651</guid><description>Here is a short description of the virtual tables layout. This is mostly taken out of the existing Taligent runtime.Virtual tablesVirtual tables (vtables) are used to dispatch virtual functions, to  access virtual base class sub objects, and to access information for  runtime type identi?cation (RTTI). Each class that has virtual member functions or virtual bases has an associated set of vtables.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><title>The .bmp file format</title><link>http://cppcoder.blogspot.com/2007/11/bmp-file-format.html</link><category>Bitmap</category><category>File format</category><author>noreply@blogger.com (renlabs)</author><pubDate>Tue, 27 Nov 2007 03:45:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-1398802410782328263</guid><description>The .bmp file format     Introduction:  The .bmp file format (sometimes also saved as .dib) is the standard for a Windows 3.0 or later DIB (device independent bitmap) file. It may use compression (though I never came across a compressed .bmp-file) and is (by itself) not capable of storing animation. However, you can animate a bitmap using different methods but you have to write the code which </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH7J1Ak7BrKWo84BdIR5bl9JL6A48IoC2W6iRmGJAIqTjrGZh4hxoNFBISMWljFc8GwLv8R0aI1A2gONHqkuj_0hG2Z_BoGYbdtMLlm9MA42freGQWK2xcaCqnx91hS5v053munjsJNw/s72-c/nhouse.gif" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Steganography</title><link>http://cppcoder.blogspot.com/2007/11/steganography.html</link><category>Cryptography</category><category>Data Hiding</category><category>Steganography</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 26 Nov 2007 04:15:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-7712912100821503132</guid><description>//Steg.hDesigned and Implementation: Renjith G/********************** header file*************************/#define BUFSIZE     1024          //512#define DATASIZE    64#define STARTBYTE   64/************type definition***********************//* typedefs */typedef unsigned char UBYTE;/***********struture definition********************/struct steg_header{    unsigned long datalen;    char key[10];}</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Fork()</title><link>http://cppcoder.blogspot.com/2007/11/fork.html</link><category>Fork()</category><category>Kernal programming</category><category>System programming</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 26 Nov 2007 04:12:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-84331276829878702</guid><description>#include#includemain(){    int ret;    ret = fork();    if(ret == 0)    {    printf("\n");        printf("Current Process pid =%d(Executed by child\n",getpid());        printf("\n");        printf("Parent Process pid =%d(Executed by child)\n",getppid());        printf("\n");    }    else    {        wait();        printf("\n");        printf("Current Process pid =%d(Executed by child\n",getpid())</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Queue</title><link>http://cppcoder.blogspot.com/2007/11/queue.html</link><category>Data Structures</category><category>Queue</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 26 Nov 2007 04:11:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-6698146917481991823</guid><description>#include# define max 3struct queue{    int queue[max];    int f,r;}q;main(){    int ch,k=1;    q.f=0;    q.r=-1;    while(k==1)    {printf("\t\t MENU\n"        "\t1.INSERT\n"        "\t2.DELETE\n"        "\t3.DISPLAY\n"        "\t4.EXIT\n"        "\tEnter Your Choice:\n");    scanf("%d",&amp;amp;ch);    switch(ch)    {        case 1:            insert();            break;        case 2:            </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Insertion Sort</title><link>http://cppcoder.blogspot.com/2007/11/insertion-sort.html</link><category>Data Structures</category><category>Insertion Sort</category><category>Sorting</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 26 Nov 2007 04:09:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-3200676839725351737</guid><description>//INSERTION SORT#include//#include#includemain (){  int a[100], n, s[100], temp, j, i;  printf ("Enter the number of elements in the array(max no:=100)\n");  scanf ("%d", &amp;amp;n);  printf ("eneter the elements     :");  for (i = 0; i &lt; n; i++)    {      scanf ("%d", &amp;amp;a[i]);    }  s[0] = a[0];  for (i = 1; i &lt; n; i++)    {      temp = a[i];      j = i - 1;      while ((s[j] &gt; temp) &amp;amp;&amp;amp; </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Circular Queue</title><link>http://cppcoder.blogspot.com/2007/11/circular-queue.html</link><category>Circular Queue</category><category>Data Structures</category><category>Queue</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 26 Nov 2007 04:08:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-1050343317153608711</guid><description>#include# define max 4struct cque{    int cque[max];    int f,r;}c;main(){     c.f=0;     c.r=-1;    int k=1,ch;    while(k==1)    {printf("\t\t MENU\n"        "\t1.INSERT\n"        "\t2.DELETE\n"        "\t3.DISPLAY\n"        "\t4.EXIT\n"        "\tEnter Your Choice:\n");    scanf("%d",&amp;amp;ch);    switch(ch)    {        case 1:            insert();            break;        case 2:            </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>BMP EdgeDetection (Monocrome Image)</title><link>http://cppcoder.blogspot.com/2007/11/bmp-edgedetection-monocrome-image.html</link><category>Bitmap</category><category>Edge Detection</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 26 Nov 2007 03:38:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-618451765252395168</guid><description>//BMP.h// Created by Renjith and Sajith#include #include #pragma oncestruct _v3f{    _v3f( ): x(0.0f), y(0.0f), z(0.0f) //default constructor    { };    _v3f(float xx, float yy, float zz )//3 argument constructor    {        x = xx;        y = yy;        z = zz;    }    float x;    float y;    float z;};class CBmp {    //Type definitions    typedef std::vector&lt;_v3f&gt;   vec3f;    typedef std::</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Classes (I)</title><link>http://cppcoder.blogspot.com/2007/10/classes-i.html</link><category>Classes (I)</category><author>noreply@blogger.com (renlabs)</author><pubDate>Sat, 27 Oct 2007 10:53:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-5566058345635831677</guid><description>Classes (I)A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions.An object is an instantiation of a class. In terms of variables, a class would be the type, and an object would be the variable.Classes are generally declared using the keyword class, with the following format:class class_name { access_specifier_1:   member1; </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data Structures</title><link>http://cppcoder.blogspot.com/2007/10/data-structures.html</link><category>Data Structures</category><author>noreply@blogger.com (renlabs)</author><pubDate>Sat, 27 Oct 2007 10:51:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-3514230917691957130</guid><description>Data StructuresWe have already learned how groups of sequential data can be used in C++. But this is somewhat restrictive, since in many occasions what we want to store are not mere sequences of elements all of the same data type, but sets of different elements with different data types.Data structures A data structure is a group of data elements grouped together under one name. These data </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Dynamic Memory</title><link>http://cppcoder.blogspot.com/2007/10/dynamic-memory.html</link><category>Dynamic Memory</category><author>noreply@blogger.com (renlabs)</author><pubDate>Sat, 27 Oct 2007 10:45:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-4123747744431120122</guid><description>Dynamic MemoryUntil now, in all our programs, we have only had as much memory available as we declared for our variables, having the size of all of them to be determined in the source code, before the execution of the program. But, what if we need a variable amount of memory that can only be determined during runtime? For example, in the case that we need some user input to determine the </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Arrays</title><link>http://cppcoder.blogspot.com/2007/10/arrays.html</link><category>Arrays</category><author>noreply@blogger.com (renlabs)</author><pubDate>Sat, 27 Oct 2007 10:38:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-3821189511535980637</guid><description>ArraysAn array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.That means that, for example, we can store 5 values of type int in an array without having to declare 5 different variables, each one with a different identifier. Instead of that, using an array we can store 5 different values </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Pointers</title><link>http://cppcoder.blogspot.com/2007/10/pointers.html</link><category>Pointers</category><author>noreply@blogger.com (renlabs)</author><pubDate>Sat, 27 Oct 2007 10:30:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-9019295921830507636</guid><description>Pointers We have already seen how variables are seen as memory cells that can be accessed using their identifiers. This way we did not have to care about the physical location of our data within memory, we simply used its identifier whenever we wanted to refer to our variable.The memory of your computer can be imagined as a succession of memory cells, each one of the minimal size that computers </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Leap Year (C++)</title><link>http://cppcoder.blogspot.com/2007/06/leap-year.html</link><category>Leap Year</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 25 Jun 2007 12:29:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-4515315562758042297</guid><description>#include  "stdio.h"#define TRUE  1#define FALSE 0int is_leap_year(int year);/*-------------------------------------------*/int date_is_valid(int day, int month, int year){int valid = TRUE;int month_length[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };if ( is_leap_year(year) ) month_length[2] = 29; //  29 days in February in a leap year (including year 2000)if ( month &lt;&gt; 12 ) valid =</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Reading Directory with C/C++</title><link>http://cppcoder.blogspot.com/2007/06/reading-director-using-c.html</link><category>Reading Directory with C/C++</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 25 Jun 2007 12:27:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-7674274069849464947</guid><description>//Read A Director//Tested in Linux and SOLARIS#include "  stdio.h"#include  "dirent.h"#include  " errno.h" int main(){printf("opening Directory 1\n");DIR *pdir;struct dirent *pfile;pdir = opendir("ren");if(NULL == pdir){printf("Error Opening Directory\n");exit(0);}while(pfile = readdir(pdir)){if(0 == (strcmp(pfile-&gt;d_name,".")))continue;else if(0 == (strcmp(pfile-&gt;d_name,"..")))continue;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Singleton Class (One Design pattern Technique with C++)</title><link>http://cppcoder.blogspot.com/2007/06/singleton-class-one-design-pattern.html</link><category>Design patterns</category><category>Singleton Class</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 25 Jun 2007 12:22:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-1558058096015129811</guid><description>What is a singleton class?A class whose number of instances that can be instantiated is limited to one is called a singleton class. Thus, at any given time only one instance can exist, no more.Can you give me an example, where it is used?The singleton design pattern is used whenever the design requires only one instance of a class. Some examples:Application classes. There should only be one </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Shared Memory Access using semaphore</title><link>http://cppcoder.blogspot.com/2007/06/shared-memory-access-using-semaphore.html</link><category>Operating system</category><category>Semaphore</category><category>Shared Memory</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 25 Jun 2007 12:14:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-1855469995636651218</guid><description>If you want to see how shared memory is implemented then go look at the Linux kernel source code.Here there is an exercise for you to understand the logic. But this is usefule only is you have good understanding of system level C language.This example if take from the website http://www.cs.cf.ac.uk (UNIX System Calls and Subroutines using C)shm_server.c#include &amp;lt;sys/types.h&amp;gt;#include &amp;lt;sys</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Bulk Rename of files In a Directory (C sourcefile)</title><link>http://cppcoder.blogspot.com/2007/06/bulk-rename-of-files-in-directory.html</link><category>Recursive Renaming</category><author>noreply@blogger.com (renlabs)</author><pubDate>Mon, 25 Jun 2007 12:11:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-4007294891923816095</guid><description>//Code tested in Linux and SOLARIS//Should be customized for individual use#include "stdio.h"#include "dirent.h"#include "errno.h"char *newname(char *,int,int);int main(){   char dirname[20]="ren";   DIR *pdir;   struct dirent *pfile;   char filename[20]="renji";   char tmppath[25];   static int i=0;   static int len;   len = strlen(filename);    //printf("Enter Directory name:");   //scanf("%s",</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Welcome to my blog</title><link>http://cppcoder.blogspot.com/2007/06/welcome-to-my-blog.html</link><author>noreply@blogger.com (renlabs)</author><pubDate>Tue, 19 Jun 2007 07:50:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-863472185804694495.post-8774422618001994708</guid><description>Its Renjith here</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>