Tag Archive: C

Feb 22

Levenshtein Distance Algorithm with C++

Levenshtein distance is a measure of the dissimilarity between two strings. The distance is the number of insertions, deletions, or substitutions required to transform a given string into the target string.

Dec 26

How to make a keylogger with Visual C++

Intercepting keystrokes Hooking Key Events There are different ways to catch the keys as they are being typed, but one of the most efficient is to monitor system events for key events. This is done with a hook, which forces Windows to call your own functions when a certain type of event happens. First, let’s …

Continue reading »

Dec 20

Mouse Programming in Turbo C++

Mouse can be used in text mode as well as in graphics mode. Usually it is used in graphics mode. Hence we must first change over to graphics mode. In our program the function initgraph() is responsible for switching the mode from text to graphics. DETECT is a macro defined in ‘graphics.h’. It requests initgraph() …

Continue reading »

Aug 21

Win32 Multithreading and Synchronization

Introduction: This tutorial will explain how to create and manage multiple threads in Windows. This is an advanced tutorial; the reader should be familiar with Win32 programming. The need for responsive user-centric programs is a good reason to create programs that use multiple threads. By creating multiple threads, a program can seem to do many …

Continue reading »

Aug 19

QuickSort algorithm, code for Java, C++

Quick Sort at work

Quicksort is a fast sorting algorithm, which is used not only for educational purposes, but widely applied in practice. On the average, it has O(n log n) complexity, making quicksort suitable for sorting big data volumes. The idea of the algorithm is quite simple and once you realize it, you can write quicksort as fast …

Continue reading »

Jul 20

Graphics in Turbo C/C++

072011_1054_GraphicsinT1.gif

Turbo C has a good collection of graphics libraries. If you know the basics of C, you can easily learn graphics programming. To start programming, let us write a small program that displays a circle on the screen.