Install Openmpibecause is the experiment, also does not carry on the multiple machine configuration, only installs in the virtual machine. The configuration of multiple machines can refer to this articleThe easiest way, apt to install
sudo
This is the Yang Hui's triangle, also known as Jia Xiansan. This is the most closely related to our current study is the coefficient rule of the 2-term powers expansion. As shown in Jia Xiansan, the third number in line 3rd corresponds to the two
C language A total of 32 keywords, as described below:
Auto: Declaring automatic variables
Short: Declaring an integer variable or function
int: Declaring an integer variable or function
Long: Declaring an integer variable or function
float:
Allocation and release of heap space#include
malloc, Calloc, realloc, free
Malloc
void *malloc (size_t size);
function: Contiguous space allocating size bytes in the heapParameters: Size_ byte countReturn value: Successfully returns the first
What is the C + + rule that four operators =,,, [], () cannot be overloads in the global domain (that is, they cannot be overloaded as a friend function)?Now let's talk about the overload of the assignment operator "="C + + stipulates that the
Array of pointersDefined:If an array whose elements are pointer data, the array is an array of pointers, that is, each element in the pointer array corresponds to a pointer variable whose value is the address.
Form:The one-dimensional pointer array
for array int a[10];A represents the address of the first element of the array, that is, the &a[0];
If you make the pointer p, point to the first element of the array, you can do so:int * P=A;Orint *p=&a[0];
So p++, is to point to the first
EOF function
EOF is the abbreviation for end of file, which means "ending files." Reads data from the input stream, if the end of the file is reached (in the case of a file terminator), the EOF function value is not 0 (true) or 0 (false).
[Example]
Let's take a look at the following code:
#include #include #include using
namespace Std;
Class Cntcharacters {Private:int cnt; Public:cntcharacters (): CNT (0) {} ~cntcharacters () {} void Opentxt (char* p)
{ifstream fin;
Errors in the program are divided into compile-time errors and run-time errors. Compile-time errors are mainly grammatical errors, such as: the end of the sentence is not a semicolon, parentheses do not match, keyword errors, etc., such errors are
There are two types of string flows in C + +, one defined in Sstream and the other defined in Strstream. What they achieve is basically the same thing.
Strstream containsClass Strstreambuf;Class Istrstream;Class Ostrstream;Class Strstream;They are
The new and delete operators are used to dynamically allocate and revoke memory operators
New usage:
1. Open a single variable address space1) New int; Opens up a storage space for the array and returns an address to the storage space. int *a =
Hashtable is a very important structure in practical applications, the following discussion of a simple implementation, although simple, but the part is still there.
One, Access interfaceCreate a Hashtable.Hashtable hashtable_new (int size)/size
Recently, in order to test the speed of the situation, because some business servers need to shut down ICMP, so that the use of ordinary ping can not adapt to my needs, so I wrote a simple TCP port based on the program, because C implementation
C language Fchdir () function: Change the current working directoryheader file:
#include
To define a function:
int fchdir (int fd);
Function Description: Fchdir () is used to change the current working directory to a
C language Fchdir () function: Change the current working directoryheader file:
#include
To define a function:
int fchdir (int fd);
Function Description: Fchdir () is used to change the current working directory to a
1. Type:
Format character format character meaning of output type
A floating-point number, hexadecimal digit and P-counting method (C99
A floating-point number, hexadecimal digit and P-counting method (C99)C Output Single characterD output signed
C language Getpw () function: Gets the password file data of the specified userheader file:
#include #include
To define a function:
int GETPW (uid_t uid, char *buf);
Function Description: GETPW () will find the user
C language Getutent () function: Get account login data from utmp fileheader file:
#include
To define a function:
struct utmp *getutent (void);
Function Description: Getutent () is used to read a login data from the Utmp
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