Set of codes C and C++

Fvirtman creation

Last update : April 25, 2017

See version :

   1. C Language       1.1. stdio.h          1.1.1.Advanced features for printf.   (printf)          1.1.2.Advanced features for scanf.   (scanf)          1.1.3.Write a text file.   (fopen,fprintf,fclose)          1.1.4.Write and Reread a text file, 2 ways.   (fscanf,fgets)          1.1.5.Write and Reread a binary file.   (fread,fwrite)          1.1.6.Copy a file using an array   (fread,fwrite)       1.2. stdlib.h          1.2.1.Sorting datas in C.   (qsort)          1.2.2.Sorting complex datas in C.   (qsort)          1.2.3.Getting an environment variable with a function.   (getenv)          1.2.4.Getting an environment variable from the main.          1.3. string.h          1.3.1.Recopy,concatenation.   (strcpy,strlen,strcat)          1.3.2.Cutting a chain by a criterion.   (strtok)       1.4. math.h / time.h          1.4.1.Mathematics opérations.   (sqrt,log,cos)          1.4.2.Date and time.   (time ,localtime,asctime )          1.4.3.Printing formatted date and time.   (strftime)       1.5. winsock2.h / socket.h          1.5.1.Network : simple chat.   (socket, bind, listen, connect, accept)          1.5.2.Sending an E-mail   (Protocole SMTP)       1.6. io.h et direct.h          1.6.1.Listing files of a directory.   (_findfirst,_findnext,_chdir)       1.7. conio.h / crtdbg.h          1.7.1.Detecting non-blocking key.   (kbhit,getch)          1.7.2.Entering a password with ****   (getch)          1.7.3.A scanf that can timeout.   (getch,kbhit,time.h)          1.7.4.Detecting memory leaks with crtdbg.h   (_CrtSetBreakAlloc, _CrtDumpMemoryLeaks)       1.8. Others concepts.          1.8.1. Deep in memory.             1.8.1.1.bits manipulations.   (operators ~ ^ & | << >>)             1.8.1.2.Using flags concept.   (opérateurs & et |)             1.8.1.3.compact structures.   (operator :)             1.8.1.4.Different type divisions.   (operator /)             1.8.1.5.Memory alignment                1.8.1.6.Endianness.             1.8.2. Functions concepts             1.8.2.1.Récursivity.                1.8.2.2.Functions pointers.                1.8.2.3.variable arguments functions.   (stdarg.h)             1.8.2.4.Old way to transmit parameters             1.8.3. Others syntaxes in C language.             1.8.3.1.Trigraphs   (??)             1.8.3.2.Sharing memory between mutiples variables.   (union)             1.8.3.3.Jumping into the code.   (goto)             1.8.3.4.Breaking functions in a loop.   (continue, break, return, exit)             1.8.3.5.Ternary operator.   (?)          1.8.4. Some algos.             1.8.4.1.Quick variable swapping.   (^)             1.8.4.2.Random numbers array, without duplicate.   (rand)             1.8.4.3.Shuffle an array.   (Fisher–Yates shuffle)       1.9. Read and Write some known files types.          1.9.1.Read and Write a PPM file.             1.9.2.Read and Write a BMP file.             1.9.3.Write WAV files.          1.10. Algorithms          1.10.1.Random maze generation       2. SDL library.       2.1. Blit and movings.          2.1.1.Multiple Blit.   (SDL_LoadBMP,SDL_BlitSurface)          2.1.2.Negative coordinate blitting.   (SDL_BlitSurface)          2.1.3.printf for SDL             2.1.4.Simple Scrolling.             2.1.5.Vertical and horizontal scrolling.          2.2. 2D concepts.          2.2.1. Sprites.             2.2.1.1.Moving multiple objets simultaneously.                2.2.1.2.Jump for a platform game.                2.2.1.3.Moving and animing a character.          2.2. Sprite concept.          2.2.1.Moving multiple objets simultaneously.             2.2.2. Maps.             2.2.2.1.Simple TileMapping             2.2.2.Jump for a platform game.             2.2.3.Moving and animing a character.          2.3. Pixels acces.          2.3.1.Drawing a pixel.   (SDL_LockSurface)          2.3.2.Color gradient.             2.3.3.Draw segments.   (Bresenham)          2.3.4.Draw some shapes.   (Bresenham)          2.3.5.Mandelbrot Fractal.   (Mandelbrot)          2.3.6.Emulation of false colors.   (Dithering)          2.3.7.Draw cartesian functions.             2.3.8.Draw parametric functions.             2.3.9.Draw Bezier curves.             2.3.10.Resize a surface.             2.3.11.Spline curves             2.3.12.Rotate,Scale,Translate a texture from pixels.             2.3.13.Multiplication tables illustration          2.4. Extensions.          2.4.1.ttfcompiler : Create image from a font.   (SDL_ttf)       2.5. Little games.          2.5.1.A little Tetris.       3. C++ Language.       3.1. Concepts.          3.1.1.Simple class.   (class)          3.1.2.Overloading an operator.   (operator)          3.1.3.More operator overload.   (operator)          3.1.4.Normalize a class.   (classe de Coplien)          3.1.5.Heritage.             3.1.6.Scope.   (operator ::)          3.1.7.Protection of class and datas.   (const)          3.1.8.Virtual Heritage.   (virtual)          3.1.9.Placement new   (new())          3.1.10.Forbid class recopy.   (private)          3.1.11.static members.   (static)          3.1.12.Pointers on methods.          3.2. Streams.          3.2.1.using cout.   (cout)       3.3. String.          3.3.1.simple string.   (cout)       3.4. STL.          3.4.1.Lists.   (list)          3.4.2.Vectors.   (vector)          3.4.3.Deques.   (deque)          3.4.4.Stacks and queues.   (stack, queue)          3.4.5.Priority queues.   (priority_queue)          3.4.6.Personnalized sorting.   (functors)          3.4.7.Sorted set.   (set)          3.4.8.Associative maps.   (map)       3.5. Boost.          3.5.1. array.             3.5.1.1.Simple array.   (boost::array)             3.5.1.2.multi array.   (boost::multi_array, boost::extents)             3.5.2.1.Non copyable class.   (boost::noncopyable)    4. Windows API.       4.1. Standard Windows.          4.1.1.Standard Messagebox Window.   (TCHAR , MessageBox)          4.1.2.Standard Load/Save Window.   (GetOpenFileName,GetSaveFileName)          4.1.3.Standard Choose Color Window.   (ChooseColor)          4.1.4.Standard Choose Font Window.   (ChooseFont)          4.1.5.Standard browse folder Window.   (SHBrowseForFolder)          4.1.6.Show the About Windows.   (ShellAbout)       4.2. Console features.          4.2.1.Colors and placement.   (SetConsoleTextAttribute,SetConsoleCursorPosition,SetConsoleTitle)          4.2.2.Console Accents.   (setlocale)          4.2.3.Codepages.   (EnumSystemCodePages)          4.2.4.Convert a chain with accents.   (CharToOem)          4.2.5.A little maze under console.   (getch, SetConsoleCursorPosition)          4.2.6.Connect Four game console             4.2.7.Game 2048 console             4.2.8.Put Pixels in console   (SetPixel)          4.2.9.Use mouse in console, a little Paint   (ReadConsoleInput)          4.2.10.Console Shoot em up             4.2.11.Whichs keys are down, which are up.   (GetKeyState)       4.3. Multithreading.          4.3.1.Using threads.   (CreateThread)          4.3.2.Giving parameters to a thread.             4.3.3.Using Mutex.   (CreateMutex)          4.3.4.Create a process   (CreateProcess)       4.4. Memory and drives.          4.4.1.Get the list of connected drives.   (GetLogicalDrives)          4.4.2.Informations about drives.   (GetVolumeInformation)          4.4.3.Request for available memory.   (GlobalMemoryStatus)       4.5. Process access.          4.5.1.Get current PID and set process priority.   (GetCurrentProcess,GetCurrentProcessId,SetPriorityClass)          4.5.2.Get the process list and the name of the EXE files.   (EnumProcesses,OpenProcess,GetProcessImageFileName)       4.6. System Informations.          4.6.1.Get the screen resolution.   (GetSystemMetrics)          4.6.2.Monitor informations.   (EnumDisplayMonitors, GetMonitorInfo)          4.6.3.Chronometre.   (timeGetTime)          4.6.4.Get the associated program from a type of file.   (AssocQueryString)       4.7. Internet access.          4.7.1.Download a file.   (URLDownloadToFile)          4.7.2.Download a file using a dll.   (urlmon.dll)          4.7.3.Send a file on a FTP server.   (InternetOpen, InternetConnect, FtpPutFile, InternetCloseHandle)       4.8. Using mouse or a joystick          4.8.1.simulate a mouse click.   (SendInput)          4.8.2.Get the mouse coordinates.   (GetCursorPos)          4.8.3.Restrict the mouse into a given area.   (ClipCursor)          4.8.4.Use a Joystick or joypad   (joyGetNumDevs, joyGetPosEx)       4.9. Sound and music.          4.9.1.Standard Windows sounds.   (MessageBeep)          4.9.2.use the PC speaker.   (Beep)          4.9.3.Play a MP3.   (mciSendString)          4.9.4.Use the internal MIDI synthesizer.   (midiOutShortMsg)          4.9.5.Speaking simulation.   (ISpVoice_Speak)       4.10. The clipboard.          4.10.1.Copy in the clipboard.   (SetClipboardData)          4.10.2.Get text from clipboard.   (GetClipboardData)          4.10.3.Get image from clipboard.   (GetClipboardData, SetPixel, BITMAPV5HEADER)       4.11. Sessions.          4.11.1.Lock the session.   (LockWorkStation)          4.11.2.Close the session.   (ExitWindows)          4.11.3.Get the name of the computer and current user.   (GetComputerName,GetUserName)       4.12. Creating windows with rc file.          4.12.1.Simple customized window.   (DialogBox)          4.12.2.CheckBox, buttons, radio buttons, and textarea.   (DialogBoxParam,SendMessage)       4.12. Using GDI+ (Graphic Device Interface)          4.13.1.Save a JPEG from clipboard   (GDI+)    5. OpenGL library.       5.1. Simple concepts.          5.1.1.A triangle and a Quad.   (glVertex3f,gluPerspective,gluLookAt,glTranslatef...)       5.2. Textures.          5.2.1.Mipmapping.   (gluBuild2DMipmaps,glTexParameteri)

Contact : fvirtman AT hotmail.com

Automatic Builder by par Fvirtman, use extern library Colorer-take5.be5

Back