# include "string. H " main () { const char * src =" Hello World "; int Len = strlen (SRC ); char * DEST = (char *) malloc (LEN + 1); char * D = DEST; char * s = SRC [len-1]; while (Len --! = 0) { * D ++ = * s --; } * D = 0; printf ("% s",
The android Java SDK is nice and all, but what if you want to runSome C service or code? Well, it turns out that this isn' t exactlyDifficult. You can compile an application using a standard LinuxCross-compiler, install it and run your programs from
Development language: C #
Development Environment: Visual suddo 2010
Development Platform:. Net framework2.0
Main class libraries: socket and threadpool
Objective: To familiarize yourself with the TCP protocol of socket under.
After adding the keyword const to the form parameter table, you can declare the member function as a constant. The const Member cannot change the data member of the object to which it operates. The const must appear in the declaration and definition
Definition of the red/black tree:
A binary search tree is a red-black tree if it meets the following requirements:
1) each node is either red or black.
2) The root node is black.
3) each leaf node (NiL) is a black node.
4) if a node is red, both of
It is not suitable for copying real parameters:1) when you need to modify the value of the real parameter in the function;2) When a large object needs to be used as a real parameter;3) when there is no way to implement object replication;
Return
To generate random numbers in Java, you can simply create a new random. in C language, it will be a little more troublesome.
Computing run time is used to compare the running efficiency of algorithms.
# Include # include # include int main ()
When I look at section 2 of the beauty of programming, it is an integer defined and then a bit. However, his OR operator symbol seems to have been written incorrectly. It is written as an exception or symbol "^", which should be "| ". I suddenly
Template Class priqueue {PRIVATE:Int N, maxsize;T * X;Void swap (int I, Int J){T = x [I];X [I] = x [J];X [J] = T;}Public:Priqueue (INT m){Maxsize = m;X = new T [maxsize + 1];N = 0;}Void insert (T){Int I, P;X [++ N] = T;For (I = N; I> 1 & X [p = I/2]>
Algorithms can be used freely after a long time of practice!
Learn kung fu and learn from each other!
# Include Using namespace STD; int gcd (int A, int B) {int REM; while (B) {REM = A % B; A = B; B = REM ;} return A;} int main () {int A, B; cout A>
C. Operator list
Data OPERATOR:
Operator
Description
Example
+
Plus values or positive values
A = 1 + 2; // result a = 3A =-5;B = + A; // Result B = 5
-
Or Value
A = 3-1; // result a = 2A = 5;B =-A; //
The procedure is as follows:# Include Main (){Cout }Warning:In file encoded ded from/usr/include/C ++/3.2.2/backward/iostream. h: 31,From hello. C: 1:/Usr/include/C ++/3.2.2/backward/backward_warning.h: 32: 2: Warning:# Warning this file has des at
When C ++ does not have a template mechanism, we use a common function. To implement an addition function, it can sum two parameters, and return values of the appropriate type based on the parameter type, you must manually write all the code:Short
This document is excerpted from Pan Kai's "exploration of c ++ object layout and polymorphism implementation" series. For more information, see http://lunatic.bokee.com/1. Empty class: Class c000 {}; // sizeof = 1 its size is 1 byte, which is a
1. class c010 {virtual void Foo () {};}; // sizeof = 4 with only one virtual function output: the size of c010 is 4The detail of c010 is 50 D0 46 00 when a class has a virtual function, the compiler will generate a virtual function table for this
For header files, see software development for other information about loadbmp. h in digital image processing.
Nocolor. c
# Include "loadbmp. H "Void nocolor () {int X, Y, P; byte point; if (lpbitmap = 0) return; For (y = 0; y
Before
For more information about Linux C Programming, see
For socket programming, refer:
Socket programming:
Http://www.cnblogs.com/skynet/archive/2010/12/12/1903949.html
Http://www.kuqin.com/networkprog/20080512/8361.html
Network byte sequence and
The article code comes from the embedded Linux application development standard tutorial
The first instance implements TCP communication between the server and the client.
The second instance uses the select function to achieve multiplexing on the
Simply put, a process copies a piece of code into multiple copies and allows them to execute them simultaneously. Inter-process communication aims to make them run in an orderly manner.
In short, threads allow multiple functions to be executed at
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