Archive | EN C – C

[C / C ] Getting mouse events in C on Ubuntu – Mouse event C on Ubuntu

To capture mouse events in ubuntu we use the library X11 / Xlib.h. Install this library with the command: sudo apt-get install libx11-dev This is an illustration from the program page http://stackoverflow.com/questions/14553435/how-to-listen-for-mouse-events-in-linux However, I still do not know how to use it in graphics. We hope you share on this issue. Refer: Click in Dev-C

[C / C ] Graphics in Dev-C

Update 24/05/2014: Tested successfully on all systems win 64 and 32 bit. Use the library and graphics.h winbgim.h use graphics on dev-C bit difficult compared to when on Turbo C Turbo C allows use even longer dev-C is not, we need some small steps to set up graphics in Dev-C. Content Using the library winbgim.h Use […]

fflush(stdin) in ubuntu (linux)

When programming c / c you often encounter the phenomenon of floating command (fails to enter data). To remedy this situation, you use the ffulsh(stdin) to clear the buffer. But on Linux does not have this function, please replace it with the command __fpurge(stdin); Code examples: Read more gets() and fget() in C/C

[Linux – C / C ] Programming C / C on Ubuntu (Linux)

Probably had too many articles to guide you programming in C / C on Ubuntu or Linux in general, but I still see a lot of your questions on the facebook group and direct message again, something like that “I learn new (work, installation) Ubuntu, C programmers now want this on how?” and so on and so forth similar questions. […]

[C / C ] Simulation Strategy Coordination exclusive SJF

Regarding his strategy will not prompt coordination here, just introduce yourself and share your simulation program that is on the graphics do in Dev-C ++. Updated on 13/05/2015: Fixed some bugs and allows you to import data from key This is the image results when running the program with INPUT.TXT file first line is the process followed by the name lines […]

[Linux – Ubuntu – C / C ] Graphics Programming with C on Linux (Ubuntu) – Programming C with Graphics on Linux (Ubuntu)

Open the screen you can see the following illustration: To do this you first check the basic package is not installed: sudo apt-get install build-essential Then run the following command in the Terminal to install the necessary packages (Maybe before you run this command to update): sudo apt-get update sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev libesd0-dev libdirectfb-dev […]

[C / C ] For example, reading record data type structure on the type of binary file in C

With Threads: Write a program to manage the notebook includes the following functions : Functions 1 : Functions imported products 2 : Sort products Function 3 : Product Search Function 1 : – Ask how many people use the product to be imported , then allows the user to enter information […]

[C / C ]get() and fget() in C/C – Warning when user gets() – Warning when use gets()

Normally we use a variable to enter the function scanf(), This function is used to enter 1 string but when met with blank sign (spaces, enter,…) then do not read anymore and that string was cut from, Example entry “nguyen van agency” then we only get “nguyen”. The fix here is that we use the function gets() to enter the string. 😀 Khi đó ta sẽ nhận được chuỗi nguyên vẹn.

Separating the range from string

This article will help you separate the range from string. For example, the string We will be out of the cup: Here its successful implementation in c and java, other languages ​​also make a ;). Added, is how to use regex, you do not clear can read more about it. In C: This is actually his way of reference and […]

[C / C ] Create a library of C – Create a library in C

When working with C, if there is some content that you regularly use and do not want to rewrite many times, Please create a library file containing the function. This article will help you do it! Content – Table of content Creating library file – Use library Create library self-created files – Using self library Create a library file to generate […]