132,728 Archived Topics
Remove Filter ![]() | |
This is the Dialogs.h part from the WGCL C++ Compiler Library I created. This creates classes for dialogs, it could cut the amount of code for dialogs you need to write in half, while still having the same amount of functionality. This library is licensed under the GNU General Public … Software Development c++ | |
Cheap, dirty code for Windows and *nix. Software Development c | |
My implementation of the [ICODE]strcmp[/ICODE] and [ICODE]strncmp[/ICODE] functions. I don't think that it is very efficient, but have managed to get both the functions' execution times to [ICODE]0.01 s[/ICODE] (At least, this is the value my profiler gives me). Enjoy! :) Software Development c++ | |
This snippet allows you to convert a text representation(*) of a [B]binary[/B] number [B]to[/B] a [B]decimal[/B] number :) (*): With 'text representation' I mean for example a string containing "1001" or "10001110011", etc. ... Software Development c++ | |
[U]Usage::[/U] [ICODE][B]ir_strcpy[/B]( [I]destination[/I], [I]source[/I], [I]range_begin[/I], [I]range_end[/I]);[/ICODE] [U]example:[/U] [CODE=c] char test[] = "Hello World!!!"; char test2[20]; ir_strcpy(test2, test, 1, 3); /* test2 now contains 'ell' */ [/CODE] Software Development c | |
This is how mine [B]strlen[/B] function would look like if I'd to implement it from scratch :) Software Development c | |
These functions, to some, may seem trivial, but many people have queried in the forums on this topic numerous times. The functions are templated, so that it can accommodate any data-type that the user wishes to use (For example, the same function can be used for converting variables of type … Software Development c++ | |
This is how mine [B]strcat[/B] would look like if I'd have to write it from scratch :) Software Development c++ | |
This is how mine [B]strcpy[/B] would look like if I'd have to write it from scratch :) Software Development c++ | |
This prime number generator is based on Eratosthenes' sieve, the found prime numbers are written to a file (you can specify it's name as a command line argument, as well you can specify the prime number upper bound (e.g: if you specify 500 as upper bound, the program will find … Software Development c++ | |
Instead of creating a new folder in users application folder under program files and putting there some visible resources, embedding those resources to single executable is better. in this snippet i will show playing an embedded sound file. Software Development | |
{-='Display the number of letters in each word typed using Dev-C LaNguaGe'=-} | |
This program can solve expressions of the following forms: [ICODE]a+b[/ICODE],[ICODE]a-b[/ICODE],[ICODE]a*b[/ICODE],[ICODE]a/b[/ICODE] ([ICODE]a[/ICODE] and [ICODE]b[/ICODE] are numbers :P) Notice: You can't put spaces in between the operands and the operator, I know this is a limitation and that there are thousands of other ways to achieve a better result, so please don't … Software Development c | |
This is not the fastest way and not the one that used inside the calculators and even inside the C++ math library. But this is just another way to find logrithm of base 10. Software Development c++ | |
A game... Depends fully on luck that u have and a little bit of smartness.. You will be given 3 chances.. and 3 nos will me running randomly. u have to click when all t three no are same.. if u succeed in this then u are t winner.. Smart … Software Development c | |
The program is exactly to work out with maths fun.. u think of a two digit no.. say 24 now add both the digits i.e;2+4=6. subtract 6 with the no tat u thought originally.. i.e;24-6=18.. see t symbol which correspond to the no 18 and then press enter to see … Software Development c | |
Probably one of the poorest sorting algorithms ever written but I provide it here and anyone who wants to use it can use it in any way he/she wants :P ... Usage: `bubble_sort(your_array, number_of_elements);` int arr[] = {52,85,2,1,-56,802}; bubble_sort(arr, 6); /* order of elements in arr: {-56, 1, 2, 52, … Software Development c++ | |
> I know there are some bad things in my code such as [ICODE]system("CLS");[/ICODE] and that this makes the code unportable and inefficient, but you could just remove it at anytime :) > It could be that my code is a bit bloated, I didn't put enough time and effort … Software Development c++ | |
This program consists of a function in one class. It demonstrates the "Left To Right" Principle used by most of the languages. Software Development java | |
This snippet basically shows you how to input a password from the user without actually displaying the characters, instead they are replaced with the ' * ' character as you type. The code is uncommented, so I will briefly explain it. This function: [ICODE]void PasswordInput(char *password, size_t maxLength)[/ICODE] has two … Software Development c++ | |
Snippet to show how to count the number of occurences of letters in a string. Software Development c++ | |
This program take user name and password from the use but the password not display on screen insted of password ***** display Program by Meghdoot(meghs) Software Development c | |
A simple C++ console calculator that uses square roots as well. Software Development c++ | |
I want to show a simple example about writing record to a file,and for checking,read back from that file. Created By FlamingClaw Software Development pascal | |
![]() | this is code that thanks to vegaseat helped me convert my programs into python30 Software Development python |
"Hello World!" done a little differently. Is this safe, unlikely; is there a point to all of this crap, nope; why are parts obfuscated, because I felt like it; was it fun, yes. You'll need the newest version of MinGW to compile, I used options -O2 -Os -s. Software Development c++ | |
Got bored, remember a question asked in the forums, and decided to try something similar. Software Development c++ | |
Hi this basicly finds and stores prime numbers at you will need to put a file called startnumber.ini with a number in it for the program to start from. Also rename the UserStorage.txt each time you use the program or it will be overwriten. Software Development c++ | |
![]() | The given code snippet checks whether a given string is a part of other string and wildcard are allowed. Software Development c++ |
This algorithm will add the searched element's place in an array This works only when there is so element what we're searching for. By FlamingClaw | |
This algorithm will decide that is there a serched element in the array.If it finds one then the loop halts.If the loop halts cause we're stepping over the last element of the array then there is not searched element. By FlamingClaw | |
Counts that how many propertied elements are in the array example:negative numbers By FlamingClaw Software Development pascal | |
The Rule: s:=0; Loop i:=1 To N s:=s+T[i]; End of Loop; Out:s; By FlamingClaw Software Development pascal | |
Hello, as promised I updated my stod-function from [URL="http://www.daniweb.com/code/snippet1147.html"]this[/URL] thread ... Enjoy ! | |
Hi there, I've written a program which can add two numbers of unspecified length, isn't that nice? To add two numbers you just do the following: [ICODE]addition(number1, number2);[/ICODE], where 'number1' and 'number2' are strings ... E.g: [CODE=cplusplus] ... cout << addition("500","10") << endl; // Print '510' on the screen ... … Software Development c++ | |
Prime or not?This little program will show prime numbers with green color from 0 to 100.By FlamingClaw; Software Development pascal |
The End.