Constructors
constructor, for string initialization
Operators
Operators, for string comparisons and assignments
Append ()
Add text at the end of a string
Assign ()
Assigning a new value
A collection (set) is an associative container that contains sorted objects
Begin ()
Returns an iterator that points to the first element
Clear ()
Clear all elements
Count ()
the library automatically defines some standard objects:
cout, an object of the Ostream class that can display data on a standard output device.
Cerr, another object of the Ostream class, outputs data to the standard error output
Disclaimer: Transfer from http://www.cnblogs.com/pengshao/archive/2011/12/26/2301461.htmlHeader file StackDemo.h1 #pragmaOnce//commonly used C + + pragma, the header file is the first to join, to ensure that the header files are only compiled
1 #include 2usingnamespace std; 3 int Main () {4 Cout2,3) Endl; 5 return 0 ; 6 }Error, can be changed to the following two kinds. 1 #include 2 # Include 3 using namespace Std; 4 5 int main () { 6 7 Cout2 , 3 ) ENDL; 8 return
Array definition, initialization of arrays: dynamic initialization, static initialization int[] Array=new int[6]; New is an operator; The initial value of the numeric type is 0,bool type is false, and the string initial value is null.Dynamic
Pointer-related issuesusing namespacestd;intMain () {//a) An integer number (an integer) intA; //b) A pointer to the integer number (a pointer to an integer) int*b; //c) A pointer to a pointer to a pointer that points to a number of integers
1. PushIn the queue because it is FIFO, push inserts an element at the end of the team.2. PopRemove the element from the top position in the queue, and push is a void function that has no return value.3. SizeReturns the number of elements in the
1, reference type as2, value typeNumeric class to String: ToString ()String to numeric class: float F = convert.parse ("123.4") and float. Parse ("123.4") and float. TryParse ("123.4")TryParse () does not throw an exception, the conversion is
1, the function access level must be higher than the parameter level, such as the function level is public, the argument must be higher than equal to public, if the internal is not.INTERNAL less than public, used for references in the same assembly,
. NET has two ways of getting the page source code1, HttpWebRequest and HttpWebResponse HttpWebRequest request = (HttpWebRequest) webrequest.create (redirecturl); = (HttpWebResponse) request. GetResponse ();
Having been in touch with C # development for four months, organize the naming conventions in C #:One: Naming rules for variables (similar to Java)1, the variable name is composed of letters, numbers, underscores2. The variable name begins with a
A variable of an enumeration type can be used only after it is assigned, and the value assigned must be valid: Different enumerations can have the same value and will not conflict, such as Week.day and Month.day; struct: Format when
Enter a year and month to output the number of days for this month1Console.WriteLine ("Please enter the year");2 Try3 {4 intYear =Convert.ToInt32 (Console.ReadLine ());5Console.WriteLine ("Please enter the
1. A control is a function that can be dragged directly from the toolbar to a form, with a certain function. Most controls belong to derived classes of the control class. Common property name (name), location (specific position), Top,left (location)2
POJ-3032, tds3032c.
Algorithm
Prepare a queue that can store up to 13 elements. The queue is empty at the beginning.
1. Enter n.
3. Add n to the queue.
4. Execute I from n to 2:// N-I + 1 element in the queueAdd a I-1 to the queue header.// At this
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