19,876 Topics

Member Avatar for
Member Avatar for tux4life

Hello, as promised I updated my stod-function from [URL="http://www.daniweb.com/code/snippet1147.html"]this[/URL] thread ... Enjoy !

Member Avatar for tux4life
0
553
Member Avatar for niladri.saha06
Member Avatar for MosaicFuneral
0
240
Member Avatar for tux4life

Hello there, I've written a C++ function 'stod', which converts a C++ string to a double ... You're free to use this code for EVERYTHING you want ... There's only one thing which I'm not appreciating: [B][COLOR="Red"]It's not allowed to sell this source code to anyone ![/COLOR][/B] The usage is …

Member Avatar for tux4life
0
4K
Member Avatar for banders7

Here's some rudimentary code that does directory traversal recursively. Useful for inspecting the contents of a directory subtree. Sorting the directory information or inspecting file details within directories is beyond the scope of this routine.

0
260
Member Avatar for Hiroshe

This code snipplet will find the placement of each letter in a array(string), from another array(character set). For example: the input would be something like this: string[256] = "gfdc" chrset[256] = "abcdefg" and the output would be: num[256] = 6, 5, 2 and 3

Member Avatar for Hiroshe
0
119
Member Avatar for surender_kumar

Hello friends here i present a simple address diary program that store name, phone number,sunsigh,best moment date of birth and place,and also hobby of a person.... When you run this u must fill password and password is "hello"... I think you will enjoy it..............

0
122
Member Avatar for surender_kumar

Hello friends, I am new participant in daniweb Here is the fantastic coding of SHEEL SORT..

0
179
Member Avatar for banders7

Here are 2 pieces of code. The first makes a hidden partition accessible by creating a path to it and assigning a drive letter. The second removes the path definition, effectively rehiding the partition. It is advised that caution be taken in the use of this code. The core to …

Member Avatar for banders7
0
600
Member Avatar for seeniya
Member Avatar for shital3144
Member Avatar for sahasrara
0
188
Member Avatar for dileepkumar235

This program displays all possible permutations of the string entered. say if u enter "abc" as input string the possible permutations would be displayed as ......................... abc acb bca bac cab cba ..........................

Member Avatar for dileepkumar235
0
176
Member Avatar for serkan sendur
Member Avatar for serkan sendur
Member Avatar for banders7

This a routine that executes a _popen() pipe on your behalf and retrieves the spawned program's/comand's console output for you. Useful if your program needs data from another program and can't communicate directly with it.

0
222
Member Avatar for ajay.krish123

Program is of the calculator which the usual thing for the operation. It has been totally implemented in the C language with the graphics and mouse functions included in it. Its not scientific but just a usual one..

Member Avatar for banders7
0
217
Member Avatar for banders7

A program that demonstrates opening Windows registry keys, reading data fields and closing the keys.

0
494
Member Avatar for banders7

Two very short routines. CLIPPUT transfers data to the clipboard and CLIPGET retrieves data from the clipboard. Developed and tested in Windows XP using a Borland C++ compiler.

Member Avatar for banders7
0
442
Member Avatar for mukorera

Iterative and recursive programs.these programs have been tested and run very well.enjoy

0
160
Member Avatar for begueradj

Hi from Begueradj, This program written in Turbo C simulates a student data bases using files. Basic operations such as seeking for a given student, deleting, adding and sorting are implemented here. Feel free to give me your points of view. Thanks, Begueradj.

Member Avatar for begueradj
0
161
Member Avatar for Shalvin

Serialization is the process of saving the state of an object into persistant medium. BinaryFormatter class is used for serializing and deserializing an object. HybridDictionary is optimized for key-based item retrieval from both small and large collections.

Member Avatar for belynmoon
0
261
Member Avatar for Duoas

First off, C does not know anything about the I/O device you are using. It can be a keyboard and monitor, or a file, or a network connection, or anything which can do I/O. What that means is that there is no standard way to do this in C. That …

Member Avatar for dangana
0
229
Member Avatar for TkTkorrovi

You likely want something graphical, where the things move. GTK version of the classic arcade game Asteroids.

Member Avatar for TkTkorrovi
0
140
Member Avatar for TkTkorrovi

A small demo about how to use GTK label as a simple console. To compile GTK program, `pkg-config gtk+-2.0 --cflags --libs` should finally be somewhere in the compiler command line in the bash-like shell.

0
313
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
111
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
737
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
194
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
215
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
340
Member Avatar for Dave Sinkula
Member Avatar for bemboysms
0
249
Member Avatar for nanodano

This code snippet actually contains a few nifty things. There are two functions, hasVisited() and main(). hasVisited() makes use of a very handy function for CGI programmers: getenv. You can see I use it to retrieve REMOTE_ADDR which is the person's IP address. In main() it gets the count from …

Member Avatar for manutd
0
262
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
142
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
152
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
172
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
185
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
329
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
379
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
338
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
138
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
186
Member Avatar for Jaks_maths
Member Avatar for ~s.o.s~
0
153
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
129
Member Avatar for Jaks_maths
0
120
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
164
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
154
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
394
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
172

The End.