Click here to Skip to main content
15,885,366 members
Everything / Programming Languages / C

C

C

Great Reads

by Martin Mitáš
How to support scrolling within your controls.
by Espen Harlinn
Choosing the right synchronization mechanisms when working with threads, thread-pools, and I/O Completion ports to create high performance asynchronous servers in C++
by Andy Allinger
Add features to k-means for missing data, mixed data, and choosing the number of clusters
by Jeffrey Walton
Perform authenticated encryption with Crypto++.

Latest Articles

by Chris Boss
BASIC: A powerful language often underestimated and undervalued
by ColleagueRiley
A multi-platform single-header very simple-to-use framework library for creating GUI Libraries or simple GUI programs.
by FPGANinja
A walkthrough and source code for designing a stream interface in Vitis HLS
by Alexey Shtykov
The thing that could generate pseudo random numbers faster than standard library does

All Articles

Sort by Score

C 

7 Mar 2010 by Luc Pattyn
This is an alternative to "Week Numbers According to ISO8601".
19 Feb 2016 by pasztorpisti
An advice to make your DLL interface more attractive and easier-to-maintain even in cross-platform projects
28 May 2010 by DecodedSolutions.co.uk
This is a simple article describing how to create an add an outlook appointment to your MS Outlook Calender.
28 Mar 2014 by Alex Culea
Shows how to create a window that behaves like a context menu
10 May 2021 by Steffen Ploetz
Check whether ReactOS is able to run OpenGL, determine a convincing IDE and get started with the OpenGL on ReactOS.
7 Oct 2021 by Mircea Neacsu
Source code organization suggestion
25 Jul 2012 by pasztorpisti
How to open a console in a non-console C/C++ application or DLL and make printf/scanf work (stdin/stdout/stderr related functions)
23 Jan 2020 by Steffen Ploetz
Another fully functional ownerdraw menu with minimal effort - this time based on Win32, with icons instead of bitmaps, with accelerators and tested for ReactOS and WinNT 4.0 to Windows 10
1 May 2017 by Arthur V. Ratz
This tip/trick introduces the basic ideas on how to avoid memory mismatched allocation/deallocation issues detected by Intel® Inspector XE for Visual Studio 2015
1 Aug 2011 by ThatsAlok
Describing various method to zeroing the buffer in memory
31 Mar 2013 by Melih Mucuk
Creating a WCF Service with JSON data for use on iOS
2 Mar 2016 by Antonio Miras
Programatically set a static IP, subnet mask and gateway to an ethernet network adapter on your local machine
4 Feb 2020 by Southmountain
Some tips on how to compile legacy Win32 programs in Visual Studio 2019 - may save you few hours to figure out why
28 Dec 2020 by CPallini
Fast integer square root computation in 8051 assembly
22 Mar 2010 by PJ Arends
I have seen many different ways to check if the computer has an active internet connection. The best one, IMO, is to check for the presence of the default route in the IP forwarding table that is maintained by windows. This can be checked by using GetIPForwardTable function found in the...
19 Jun 2015 by ergohack
System.Data.SQLite is great, but was missing some BLOB support. Switching to the native source project was easier than expected and provided significant functionality benefits.
18 Dec 2021 by Kai Schtrom
Win32_NetworkAdapterConfiguration WMI class in plain C and C++
17 Dec 2022 by Steffen Ploetz
High-end quality in text rendering concerns not only the characters, but also the character spaces - and here FreeType is not quite up to date anymore: The kerning used by FreeType is not always available (especially with newer fonts).
12 Dec 2013 by Cloud Hsu
How to remind review in iPhone App
23 Oct 2015 by Ph. Jounin
A C-replacement for MessageBox
21 Jun 2016 by Dharmateja Challa
Tip on how to simulate external interrupts using Atmel Studio 7 for AVR Atmega MCUs
17 Feb 2021 by Gábor Angyal
Binding C structs and functions to Kotlin is easier than you have thought!
18 Feb 2012 by GregEllis
You can do it with some XORs:int a = 25, b = 7;a = a ^ b;b = b ^ a;a = a ^ b;Or the same thing with some shorthand to make the code even harder to read:a ^= b;b ^= a;a ^= b;
2 May 2012 by Itai Basel
A macro that gets current function's return type on visual C++
17 Dec 2015 by Tim ONeil
Using the autoconf tool chain to add modules to the Linux kernel
27 Dec 2020 by Steffen Ploetz
Step-by-step instructions and source code snippets for inserting a bitmap (or a section of it) into an icon image.
26 Jan 2024 by Member 16179004
Capture Enter key in edit control with no dialog box and no subclass.
17 Feb 2012 by josh.rendon
That conclusion is definitely wrong. Your equation expanded equals: b = (a+b) - (a-b) = a+b - a + b = 2*bFor your example a=20, b=10b = (20+10) - (20-10) = (30) - (10) = 20b = 20 + 10 - 20 + 10 = 20A counter example to disprove this: a=75, b=88b = (75+88) - (75-88) =...
27 Sep 2012 by david pretham
Windows Native API application
11 Feb 2015 by WoodyMou
Session 1: Setup SoftEther L2TP server on Amazon AWS Ubuntu
28 Nov 2016 by Zebedee Mason
Or why not both? This shows how.
21 Oct 2019 by Steffen Ploetz
How to embed icons into Win32 programs without utilizing resources - useful for platforms without resource editor/resorce compiler, e.g., ReactOS. Learn the missing things about the .ico format.
21 Feb 2021 by Steffen Ploetz
My best practice approach to change the image of a toolbar button
15 Jan 2010 by avinash064
It is very simple :laugh: and fun ..just divide the line before and after * , likeconst int * pconst int (before *) represent [constant integer]and *p represent a pointer add both u get a pointer pointing to a constant integer , it means u can't change value but pointer can...
15 Apr 2010 by Joshua Tully
So I’m playing around with DX10 and decide to do some input work.  After much research apparently no one can decide what the best way to handle keyboard input so I’m just going to use WM_KEYDOWN/UP and store the state in a bool[] and check that in the rendering code.  Also, instead of using...
13 Aug 2010 by Ohmu
A step-by-step Guide to getting a pure code application template.
26 Jul 2011 by Dave Cross
I just use OutputDebugString() and Sysinternals' DebugView.exe.
4 Oct 2012 by Ritesh_Singh
C++ code to connect/access DB2 database using DB2 call level interface(CLI)
12 Jan 2013 by Andreas Gieriet
Short tip to show a convenient use of the lesser known xor operator
4 Mar 2014 by Melih Mucuk
Configuring and using CocoaPods on iOS projects.
28 Oct 2015 by Alexander Iskhakov
Creating a HTTP proxy using Play framework and WS API
16 Dec 2015 by JinWenQiang
Just a brief introduction of a simulator to build wireless environment
8 Apr 2016 by jurhas
Solving graph on linear time
11 May 2016 by Member 11246861
RaspberryPi2 master transmits to and receives from Pic24FJ64GB002 slave through I2C
22 Feb 2018 by Asif Bahrainwala
OpenGL Compute Shader
1 Jun 2018 by Member 13737597
This article shows how Windows generates IP header's ID field
15 Jan 2020 by Steffen Ploetz
A solution for: If the toolbar is created button by button with single TB_ADDBUTTONS calls, the width of the separators is not calculated correctly.
12 May 2020 by D4rkTrick
Big picture of GAction, GActionGroup, GActionMap, GActionEntry, GSimpleAction and GSimpleActionGroup
9 Jun 2023 by AbdulRahman A. Badry
Alter your display gamma-ramp to correct & calibrate it
9 Aug 2011 by YvesDaoust
What about this, using SSE2 assembly (32 bits):void Zero(void* Buffer, int Count){ char* Cur= (char*)Buffer; char* End= (char*)Buffer + Count; // Clear the initial unaligned bytes while (Cur
20 Aug 2014 by pi19404
This article describes the method to cross compile C/C++ library for Android OS
5 Oct 2014 by KarstenK
Some toughts whether to prefer Objective-C or Swift.
24 Jul 2015 by BEmbedded
This article discusses 'C' code used to control a Newhaven OLED in 4-bit mode. It is a MBLABX project.
3 Oct 2015 by Uttam Kotdiya -India
This tip demonstrates how to use posix message for Inter Process Communication (IPC) in C#, Mono on Linux
14 Feb 2016 by Jigar_Patel
Amazon S3 lib for uploading file in C++ using VS2010
19 Feb 2016 by Member 11246861
Raspberry master, Pic24 slave over SPI
13 Apr 2016 by Member 11246861
Within LAN, laptop gets signals from microcomputer and microcontroller using TCP/IP and SPI
9 Feb 2010 by Eugen Podsypalnikov
Hello :)Your own description of the second parameteris different to the "original"...http://msdn.microsoft.com/en-us/library/ce3zzk1k(VS.80).aspx[^]
15 Jul 2010 by Paul Brower
This tip will allow you to return the value from column X, where column Y matches your filter
9 Feb 2011 by Karl Phillip
If you are looking for a true transparent window to render your 3D objects, check this thread:http://stackoverflow.com/q/4052940/176769
21 Jul 2011 by zvx
How to fool the C pre-processor into accepting an empty parameter to a #define
26 Jul 2011 by Jaime Olivares
Plain old console output is still a valuable debugging tool, even when used in a GUI application.There are many tools here in CP that can be combined with console output like:CConsole - a simple console for debug output[^]Creating a console for your MFC app's debug output[^]You can use...
21 Aug 2011 by murtaza dhari
A generic dropdown control using LINQ to SQL and Entities using Reflection
6 Nov 2011 by Member 4079860
Describes a process to load/unload built in drivers under WinCE at run time to speed up development process
3 Jan 2012 by kooyou
The second form is wrong. A two dimensional pointer does not equal to a two dimensional array. But you can use an one dimensional pointer to reference the two dimensional array.int arr[1][20];int *pTwoDem=(int*)arr;Now you can use *(pTwoDem+10) to replace arr[0][10].
25 Apr 2012 by Member 7961821
Life debug plug-in of non debugable host
6 Nov 2012 by Pranay Rana
Design TypeDataSet from Storedprocedure using temptable
1 Nov 2012 by Subhendu Sekhar Behera
Algorithm to find out all the Matchings and Uniquely Restricted Matchings in a Graph
27 Nov 2014 by Abdallah Al-Dalleh
How to handle post data coming inside an HTTP POST request
13 Jan 2015 by Lai Taiyu
How to do simple image binarization?
25 Feb 2024 by ColleagueRiley
A multi-platform single-header very simple-to-use framework library for creating GUI Libraries or simple GUI programs.
20 Nov 2013 by Richard MacCutchan
Obscure a window or the screen and show a dialog.
24 Oct 2022 by Tiago Cavalcante Trindade
How to use WSL, GUI on WSL and how to compile for Linux on Windows
26 Jun 2013 by Tecfield
This post shows how to make a callback to C# from C/C++
15 Mar 2016 by cruppstahl
Describes algorithms for integer compression, introduces a few libraries and shows how to use them
24 Mar 2014 by pasztorpisti
A custom implementation of the FindResource() and LoadString() functions with better error indication. Pointing the direction for those who want to learn the binary PE resource format.
26 Jan 2010 by CPallini
The question: "How can I extract 5 random cards from a deck?" (or similar), appears every now and then at the C/C++ forum.I use the following method:const int CARDS = 52;int card[CARDS]; // the 'card' array represents all of the cardsint i, deck_cards;// initializationfor (i=0;...
15 Dec 2017 by Laurie Stearn
Dialogex with Listbox to manipulate long paths in Windows
15 Mar 2016 by araud
Did you ever want to know where most of the memory is consumed? Whether it leaks or just gets allocated too much. This home brew memory tracker is yet another bicycle that you will be able to tune for your needs.
31 Dec 2020 by Kai Schtrom
Display smart messages on the Windows Desktop as XBOX360 achievements
18 Mar 2019 by qqmrichter
Overuse of #define can be ludicrous.
6 Mar 2013 by Ahmed Elkafrawy
An easy way to simulate keyboard press & release keys to another application
28 Feb 2014 by _Ravikant Tiwari_
This program will demonstrate the process of injecting code into already running processes. Here we have choosen to inject into Explorer
6 Feb 2014 by CPallini
A simple algorithm for counting occurrences of symbols in files
9 Mar 2015 by sunhui
Integrate .NET Component to your Native MFC Application at runtime
3 Mar 2014 by CPallini
Simple approach to heap data structure and heapsort, using C and Lua
20 Jan 2017 by marcus obrien
This article compares the OO features of inheritance and function overriding in C++, C# and Java.
6 Nov 2012 by Philipp Sch
How to use an IStream-Interface with FFmpeg
7 Nov 2014 by Ullas_Krishnan
This is only for students who are developing mini projects with Turbo C / C++ Compiler. This example may help you to get an idea in submitting your mini projects with stunning user interface experience with Mouse click events.
23 Jul 2011 by Cloud Hsu
Stack implementation for Objective-C.
6 Nov 2011 by Pascal Ganaye
When you search manually, you can search for every odd number that is a step of 2. If you're a bit more clever (as you are), you can use steps of 6 (2 * 3). Testing (testno+1)%6==0 is very similar to (testno % 6) = 5.You can speed up big time by having a loop that increments per steps of...
22 Nov 2015 by Marc Clifton
Each function should answer "how-what-why."
30 Jul 2013 by YoungJin Shin
How to wake up a PC using waitable timer
29 Mar 2017 by Taehoon Kim 1004
Capture program using GDI
11 Mar 2010 by chevu
I don't know whether these type of tips are allowed or not. But after having experience of core algorithm-base technical interview I thought I should share question I was asked in my interview.They asked me to show all methods I know to swap values of two variables.I Tried my level best...
15 Oct 2015 by Abhishek Nandy
Smartwatch Development with pebble
17 Apr 2016 by Adamanteus
Preserving overheating processor in multitasking environment
13 Dec 2013 by CathalMF
Describes with an example of how you can call C#.NET methods from unmanaged C++ code.