The role of the 1.C methodA. Load settings user's configuration, saved in a C function in the static variable $_config
B. Reading the user's configuration (read from $_congig)
2. Demand Analysis:
1. Set Variable
1. Two-D array
Copy Code
The variable parameter means that the number of parameters can change, can be more or less, also indicate the types of parameters can also change, can be int,double can also be char*, class, structure and so on. A variable parameter is the key to
1. A simple introduction to the friend function
1.1 Why to make the Ufida function
Reduce system overhead and improve efficiency when implementing data sharing between classes. If a function in Class A accesses a member of Class B (for example, an
The explicit keyword is used to modify the constructor of a class, indicating that the constructor is displayed, relative to the implicit keyword.First of all, this keyword can only be used in the constructor declaration within the class, but not in
I. INTRODUCTIONThere are three ways to use NEW: plain New,nothrow new and placement new.(1) Plain new, as the name suggests, is the ordinary new, is our usual use of new. This is defined in C + +:void* operator New (std::size_t) throw
It's a bit tricky to use an integer-turn string because ITOA is not in standard C, and even with itoa, other types of strings are not very convenient. Then went to the Internet to find a bit, found a good way:
Copy Code code as follows:
This article describes the C language implementation of BMP conversion JPG method. Share to everyone for your reference. The implementation method is as follows:
/****************************************************************************
The examples in this article describe how C + + obtains file state information. Share to everyone for your reference. as follows:
//c++ Get file status information source,//c++ get file on disk mnemonic code,//c++ file creation time source
The STL has a sort function that can be sorted directly into the array, with a complexity of N*LOG2 (n). Sort () is defined in header file . The sort function is a function of the standard Template Library, where the start and end addresses are
C language Mktime () function: Converts time to elapsed secondsheader file:
#include
To define a function:
time_t mktime (Strcut TM * timeptr);
Function Description: Mktime () is used to convert the TM structure data
1, about mutable keywordFirst of all, the mutable keyword can only modify non-static and very variable member variables, and the values of the member variables decorated with mutable can be modified in the const function.For example, the following
C language malloc () function: allocating memory space dynamicallyheader file:
#include
malloc () function is used to dynamically allocate memory space (if you do not understand dynamic memory allocation, see: C Language Dynamic
Today do Usaco to use the operation of the file. Before doing Usaco just formatted some write freopen ("xxx.in", "R", stdin) and "Freopen (" Xxx.out "," w ", stdout)"
Baidu Encyclopedia is so introduced:
Function Name: Freopen
function: Replace a
C language strcmp () function: Comparing strings (case-sensitive)
Header files: #include
strcmp () is used to compare strings (case-sensitive), and the prototype is:
int strcmp (const char *S1, const char *S2);
"Parameters" S1, S2
In GCC, you can use the attribute keyword, declare constructor and destructor, and the code is as follows:
Copy Code code as follows:
#include
__attribute ((constructor)) void Before_main (){printf ("%s/n", __function__);}
__
Define an empty C + + class, such as
Class Empty{}
An empty class is no longer empty after the C + + compiler has processed it, and the compiler automatically declares some member function for us, and the general compilation past is equivalent to
Const keyword:
A defined object with a const modifier is called a constant object;
The declared member function with the Const modifier is called a constant member function;
Declared data members that are decorated with const are called constant
Bubble Sort Method
Topic Description:
Use a one-dimensional array to store the number and score, and then sort the output by grade.
Input:
Enter the first line to include an integer N (1The next n rows consist of two integers p and q,
ProblemEnter a string that prints all the permutations of the characters in the string. For example, the input string, ABC, outputs all strings that can be arranged by the character A,b,c Abc,acb,bac,bca,cab and CBA
IdeasThis is a typical recursive
Today in the 99 multiplication online games (read my Linux under the C implementation of the database backup (fourth edition) should know I was there mentioned ^.^) when I encountered the information read the file encountered a return line feed
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