The source code of the screenshot program is available everywhere on the Internet, but it basically does not support multiple monitors.At one time, I thought it was very difficult to support multiple monitors.
(Demo
1. Makefile
INCLUDE =/usr/include/mysql/
LIBS =/usr/lib/mysql
All:
Gcc-I $ (INCLUDE)-L $ (LIBS)-lmysqlclient xxx. c-o xxx
Clean:
Rm-f xxx
2. mysql header file and library file configuration
If mysql is installed by default, configure it in
When to use a virtual destructor
Class Base{Public:Base ();~ Base ();...};
Class Derived: public Base{...};
Base * p = new Derived;Delete p;
In this example, if the base class pointer p points to the object of the derived class, releasing the
# If _ MSC_VER> 1000# Pragma once# EndifExplanation:This is Microsoft's pre-compilation control.When _ MSC_VER is relatively small, it supports something different from the new version.
_ MSC_VER:MS: Microsoft (Microsoft) AbbreviationC: MSC is
1. The value defined by const cannot be changed, similar to java final.[Html]# Include "stdio. h" Main (){Int const x = 15;X = 16;Printf ("% d \ n", x ); }
Output:[Html]Pateo @ pateo-B86N53X :~ /Work/study $ cc main. c-o mainMain. c: In function
First version:[Cpp]# Include // The following is the all-round comparison function. a> B returns an integer. a # Define COMPARE (TYPE, a, B) (TYPE) a-(TYPE) B) Int main (int argc, char * argv []){Double a = 1, B = 1.5, c;Int x = 10, y = 1, z;Char m
Assert. h is the header file in the C standard function library. The assert () macro is defined for program debugging.In the C standard function library, it is a very special header file. You can introduce it several times for different effects.
When I took the test, I encountered a question about const, which is roughly as follows:
The following code is provided to check whether the code can be compiled, run, and run.
[Cpp]Const int a = 1; Int * B = (int *) &; * B = 31;
The above code
The following Error Examples are my errors during programming. Here I will summarize and propose measures to prevent them.
Instance 1:
Error Code
......
For (I = count-1; I> = 0; I --)
{If (ULong) memblock = (ULong) (pMemInfo [I]. addr ));{Fprintf
C language library function name: introduction function prototype: size_t fread (void * buffer, size_t size, size_tcount, FILE * stream); Function Ability: read data from a FILE stream, read count elements, each element size byte. if the call is
[Cpp] # include int main (void) {int I = 2147483647; unsigned int j = 4294967295; printf ("% d * % d ** % d \ n", I, I + 1, I + 2); printf ("% u * % u ** % u \ n", I, I + 1, I + 2 ); printf ("% d * % d ** % d \ n", j, j + 1, j + 2 ); printf ("% u *
Regular Expressions, also known as regex or regexp, is a simple and flexible text processing tool. It can be used to precisely find the content that matches a specified rule in a text. For more information about regular expressions, see here. Common
[Plain] Description After three characters are entered, the three characters are output in ascending order of the ASCII code of each character. Input There are multiple groups of input data. Each group occupies one row and consists of three
Description
There are n integers, so that the last m number is changed to the first m number, and the other numbers are shifted to the following m (m
Input
The input data has two rows. The first number of the first row is n, followed by n
Simple programs can be implemented through commands
[Plain]# Time./test Real 0m2. 033 sUser 0m2. 032 sSys 0m0. 000 s
# Time./test
Real 0m2. 033 sUser 0m2. 032 sSys 0m0. 000 s
If the time command is not convenient, you can use system functions.
[Cpp]#
This article describes the data PACKET socket, which is one of the two available Windows Sockets types. (Another type is stream socket .)
The data PACKET socket supports two-way data streams, which cannot be delivered sequentially or repeatedly.
HashTable is a very important structure in practical applications. The following describes a simple implementation. Although simple, all of this is still available.
1. access interface
Create a hashtable.
Hashtable hashtable_new (int size) // size
1. What is the output result of running C code?
[Cpp]Int main (int argc, char ** argv []){Char str1 [] = "hello world ";Char str2 [] = "hello world ";Char * str3 = "hello world ";Char * str4 = "hello world ";If (str1 = str2)Printf ("str1 and str2
Print? Description A department store uses a discount method for sales promotion.(1) If the price is 1000 yuan or higher, the discount is off;(2) 2000 Yuan or more, off;(3) If the price is 3000 yuan or higher, the discount is off;(4) 5000 Yuan or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service