15,552 Topics

Member Avatar for
Member Avatar for TkTkorrovi

Replaces every occasion of the pattern, or only the first occasion if there is a subexpression, between \( and \), anywhere in the regular expression, as repeated replace is not what one would expect in that case. The string size is restricted in POSIX regular expressions to the size of …

Member Avatar for xaviv
0
1K
Member Avatar for sweetleaf

THE program highlights how to create a 2d array in freestore using pointers.. this is my first post so if i commit any fallacies regarding protocol or syntax please forgive me ....

0
104
Member Avatar for vijayan121

choose a random element from a sequence when a. you do not know how many elements are there before hand b. you want to make one single pass through the sequence c. you do not want to use auxiliary storage

0
707
Member Avatar for Mpiangu

hi every body try out this code it can store your info and then retriaeve it ant any time you wish. They are two codes each wrote separatly so first write the outputting code and run it. Then write the inputting code and also run it have fun:lol:

Member Avatar for Mpiangu
0
191
Member Avatar for Lazaro Claiborn

Here is just a simple program to sort two strings inputted from the user entered on the command line.

Member Avatar for John A
0
214
Member Avatar for SpS

For all functions, a domain error occurs if an input argument is outside the domain over which the mathematical function is defined. On a domain error, the function returns an implementation-defined value.

Member Avatar for Dave Sinkula
0
334
Member Avatar for Dave Sinkula
Member Avatar for bemboysms
0
246
Member Avatar for nihilks

The program uses doubly linked lists to store the numbers where each node contains a single digit . Hence numbers of any length can be used as operands . Program works only with +ve integers

0
130
Member Avatar for roverphoenix

the code now contains snippet to create the linked list too! any questions can be directed to [U]raghu_tillu@hotmail.com[/U]

Member Avatar for virusfree
0
150
Member Avatar for ~s.o.s~

Hello to everyone out there. Recently many people on different forums have been asking how to make a recursive function which reverses the string passed to it. But unlike the normal recrusive funtion which only prints out the reversed string, this implementation returns a pointer to reversed string.

Member Avatar for roverphoenix
0
170
Member Avatar for ~s.o.s~

The program parses the digits in the number supplied to it and converts it to aplhabetical equivalent. Fore eg. input: 1234 output: one two three four This is a simple exercise for newbies, must try out. Tested and works under ideal input conditions.

Member Avatar for ~s.o.s~
0
183
Member Avatar for Ene Uran

Just a short little C program to send beeps to the PC internal speaker. Beep(frequency_hrz, duration_ms) is a WinAPI function as is Sleep(ms).

Member Avatar for Ene Uran
1
322
Member Avatar for andor

This algorithm proved to be effective when two images are combined. The picture beneath (background) is seen if alpha component of fronth picture is less then 0xFF. If alpha of front picture (src in snippet) is zero then all we see is background picture. The format of colour is ARGB …

Member Avatar for Jason Zhang
0
1K
Member Avatar for roverphoenix

A simple program to calculate combinations of a string using recursion, I have used a malloc string of size 100 , you can change it to whatever value you want. The author is currently working at Microsoft. for eg if input string is abcd and you want all 3 letter …

Member Avatar for roverphoenix
0
371
Member Avatar for Dave Sinkula

This snippet is an example of using XOR encryption to encrypt/decrypt a file. It uses command-line input parameters as follows:[indent]argv[1] - name of input file to encrypt/decrypt argv[2] - name of output file argv[3] - crypt key[/indent]For example, an input file called "main.c" is used to create an output file …

Member Avatar for vonqi
0
333
Member Avatar for Dave Sinkula

In [url=http://www.daniweb.com/code/snippet259.html]Part 1[/url], the code reversed the string in place. This version uses a source and a destination string.

0
129
Member Avatar for Rajnesh

/*This program works just like MS-DOS. It takes in the input, uses the C Library, uses the system files and function, executing and displaying the code on the same command prompt. */

Member Avatar for Ancient Dragon
0
1K
Member Avatar for nanodano

This snippet shows how to use command line arguments as variables in your program. A command line argument is extra information you give a program at runtime, by typing the information after the program name like so: Linux might look like this: user$: ./myprogram argument1 argument2 A windows command prompt …

0
182
Member Avatar for Jaks_maths
Member Avatar for ~s.o.s~
0
144
Member Avatar for Jaks_maths

Returns the duplicate value in array t[n], which contains numbers 1 to n-1. Given two approaches with O(n) and O(n-square) complexities.

Member Avatar for yogeshwar
0
126
Member Avatar for Jaks_maths
0
119
Member Avatar for Jaks_maths
Member Avatar for dubeyprateek

[B][COLOR="Red"]Introduction[/COLOR][/B] There are many times when we try to create a binary search tree of many different data types. This article explains creation of a template library CTree. template <class T>class CTree can be used to create a binary search tree (BST) of any data type. [B][COLOR="red"]Features[/COLOR][/B] This class support …

0
154
Member Avatar for Vagabond

Beginner C++ - A simple calculator writen in C++, compiled on Tubo C++ v4.5 & Borland C++ 5.5. The user inputs numbers & chooses '+','-','*'/' The operator is tested. If correct the appropriate sum is preformed.

0
152
Member Avatar for vicky_dev

This program calculates the determinant of a square matrix of any order using a recursive function. Uses a square matrix struct and related functions.

Member Avatar for royujjal
0
382
Member Avatar for Eng. theFOX

count the number of occurrences of a sub-string in another string. a good example for learning how to make your own functions like strcpy, strlen and strcmp

0
167
Member Avatar for Dave Sinkula

Yet another angle at this same topic. [i]See also [url=http://www.daniweb.com/code/snippet318.html]Parsing a String into Tokens Using strcspn, Part 1[/url] and [url=http://www.daniweb.com/code/snippet443.html]Parsing a String into Tokens Using strcspn, Part 2[/url].[/i]

0
721
Member Avatar for Dave Sinkula

This snippet is a variation of the code in [url=http://69.93.117.133/code/snippet318.html][i] Parsing a String into Tokens Using strcspn, Part 1[/i][/url]. It uses canned strings rather than reading from a file. [i]See also [url=http://www.daniweb.com/code/snippet444.html]Parsing a String into Tokens Using strcspn, Part 3[/url].[/i]

0
745
Member Avatar for roverphoenix

Regular expression pattern match in a string, I only checked with * as wild card, other wild card characters are easy implement but I havent done that. any problems you can email me @ [email]rramaswa@usc.edu[/email] platform - Unix/Linux, havent tested in windows, should'nt be a problem unless some standard header …

Member Avatar for ~s.o.s~
0
169
Member Avatar for Dave Sinkula

How might I write an implementation in C of a case-insensitive version of the standard library function [inlinecode]strcmp[/inlinecode]? Here's how I might. This this is often available as a nonstandard function that may be called [inlinecode]stricmp[/inlinecode], [inlinecode]_stricmp[/inlinecode], [inlinecode]strcmpi[/inlinecode], or [inlinecode]strcasecmp[/inlinecode]. [i]See also [url=http://69.93.117.133/code/misc.php?action=edit&codeid=316]Strings: Comparing[/url].[/i]

0
345

The End.