Generating Gray Codes in C

This is C source code, written in the GCC platform (Ubuntu, 14.04 LTS, Linux). The code generates Gray Codes. At first a palindrome number is being generated. If we Push n elements in the stack, then it generates a palindrome number of length (2^n) -1. This is the special property.

Palindrome Generation

This is a code is written with the gcc platform (Ubuntu, LINUX); however, since it is C-based code, it should be portable. The listing generates a palindrome number from some given numbers. The operation is based on stack and will actually generate the palindrome of length ( 2n -1 )

The fill() Algorithm

The algorithm fill() is declared in as follows: void fill(ForwardIterator f, ForwardIterator l, const T&); The arguments f and l mark the sequence’s beginning and end, respectively. fill() fills the elements in the sequence with the fixed value T. This algorithm is useful when you want to initialize or reinitialize

Disable the Default Popup Menu on Text Boxes

Some controls in VB4 and VB5, such as the TextBox control, have a default context menu that appearswhen you right-click on the control. If you want to pop up your own context menu, no property or methodof those controls exists to disable the default behavior.To solve this problem, place code