49,761 Topics
| |
A quick way of spying inside of a process. You could also turn this into something like a disassemble, pretty easy, if you wanted too. Quick Notes: The inline assembly is GCC dependent(quick fix for other compilers), and in MinGW you need to link th32 and gid32. The code flow … | |
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 … | |
// Displays a file in either upper- or // lowercase depending upon a user request. #include <fstream> #include <iostream> #include <string> #include <ctype.h> using namespace std; // Display(): display text stream using ToFunc // modification void Display(ifstream &fin, int (*ToFunc)(int c)) { // extract and display characters one-at-a-time char CurrentChar; … | |
Dear all This code is simulate some of math library funcs. Good Luck! | |
This is a sample code snippet of a quicksort that uses templating and function pointers to allow the user to sort an array of anything from numbers to strings to structures. The idea is, that the coder writes a small function thats return type is bool, It should return true … | |
Hi friens Linear search is a way of finding an element in the array that we made it . Binary search is quicker than Linear search . in this code if key was found , it is removed from array and then sorted array is shown again. Good Luck! | |
Dear all This code shows, look for an integer number in the array of this type that we used from Binary search. It was wrote by Borland 5.02 . Good Luck! | |
This snippet can be used to convert from bases between 2 & 16 to base between 2 & 16. This is an extension on converting decimal to any base snippet found here: [url]http://www.daniweb.com/code/snippet1067.html[/url] (By no means is this the best method of doing this, but provides rather a nice way) | |
Pascal's triangle is a geometric arrangement of the binomial coefficients in a triangle. The rows of Pascal's triangle are conventionally enumerated starting with row zero, and the numbers in odd rows are usually staggered relative to the numbers in even rows. A simple construction of the triangle proceeds in the … | |
Dear entourage Here is a solution that read two matrix of complex numbers ( including imaginary an real ) and add and multiply these together. I wrote it by Borland 5.02 . Do joy !!! | |
Dear all This code first read a string then shows number of repetition of each character . I wrote it by Borland 5.02 . Good Luck ! | |
This snippet shows how you can manually split up a sentence using multiple delimiters. In this example, I split up this sentence: [ICODE]"Hello, my name is william!"[/ICODE] into the following: [ICODE]"Hello"[/ICODE] [ICODE]"my"[/ICODE] [ICODE]"name"[/ICODE] [ICODE]"is"[/ICODE] [ICODE]"william"[/ICODE] As you can see, the delimiters are not included ([ICODE]" ,!"[/ICODE]) | |
Hi my friends In this part you can see a link list that sort when you add your number. First number set as the first node. next number that you will enter , is compare with first node. if it was less than first , it set as first . … | |
Dear all This program takes from you a alphabetic character and shows all of characters before it .(ascending or descending) I wrote it by Borland 5.02 . DO JOY!!!! | |
Dear my friends This code take base of time details as second , minute and hour . it also take base of date details as day , month and year . Then it take length of time and date details . Finaly these information is process by program and it … | |
This code converts decimal number to hexadecimal number I wrote it by Borland 5.02 . Good Luck | |
Hi Hi Hi this solution is inverse of other solution that changed Decimal number to hexadecimal . It changes hexadecimal number to Decimal ! There is the other way to change characters to numbers. Good Luck! | |
Hi ladies and gentlemen This program is a sample of data structure for information of students . this data structure is Linked List that include public & private filds. Its private has the other class which i named it node. node builds physical structure of linklist class. node class consist … | |
Dear programmer This program get 2 (simply) numbers in 10 radix , then changes them to 16 radix and add together and finally shows result. I wrote it by Borland 5.2 C++ . Good Luck! | |
I received some feedback on my [URL="http://www.daniweb.com/code/snippet1019.html"]earlier code snippet[/URL] regarding how to generate unique random numbers and someone suggested I make a shorter, easier example, so here it is. This example simply generates the integers from 0 to 9 in random order without any repeats. It is basically the function … | |
After flipping through some organic chemistry books I had, I found a interesting little table of basic hydrocarbons. I decided it would be nice to play around with it, by putting together something that could to some accuracy generate them. I am by no means a chemist. You don't even … | |
I decided to find a use for the STL map, and this is what I decided would be cool to practice with. Just have three placed in the code. Could use a function to load the requested elements from a file. | |
Very often you find that you need to generate an array of integers where each integer is unique. The program below contains two functions that do that in different ways. One uses a boolean array to keep track of the numbers that have been generated. If a number has already … | |
From part of a cryptanalysis tool I was writing, the other day. A way of obtaining possible XOR'ed string values. If you ever get to the point in the analysis that you can simply XOR the string to get closer towards your goal, of finding a weakness, this might be … | |
Occasionally there's times when you want to shift a bit over, but you would like to preserve the end of it, for one reason or another. Such as with say you have: [icode]10000001[/icode] but you would like: [icode]00000011[/icode] then latter on back to: [icode]10000001[/icode] Or in Dec 129-into-3, and 3-into-129. … | |
Provides a means of performing operations on Rational numbers that can be treated as fractions to make non-whole numbers easier to calculate and read than typical floating point storage types. This was a project for a class. This is by no means an attempt to "reinvent the wheel" (The reason … | |
Programming Environment: Windows XP Compilers: Borland C++ Builder 6 (Personal)/Borland C++ 5.5 (freebie) This is a routine that queries the logical drives in the system, along with their device types, local/network status and whether or not the devices are removable. Once the data are gathered, the caller's selection parameters are … | |
Hmm this implementation is a bit bulky and unnecessary, but it was required as a project for one of my classes. Programming perspective: You'll notice in the code that I'm still fairly new to manipulating streams directly in C++, but I am trying my best =P. The StandardIncremental overhead could … | |
Heres a snippet that allows you to make your own images by using a mathematical formula. It gives you fast access to each pixel in the bitmap, and then saves the image as a [B].bmp[/B] once its made. You can be creative like this and make images which would be … | |
Simple program that returns a vector of string elements based on the string argument and the token specified. |
The End.