Memory Allocation Management Functions
Void * calloc (n, size)
Function: allocates memory based on specified data objects.
Return the Data Type address of void. If it fails, null is returned.
Example:
Float * P;
P = (float *) calloc (500,
// Call the queryperformancefrequency () function to obtain the clock frequency of the timer. // call queryperformancecounter () before and after events that require strict timing, and use the difference in counting and clock frequency obtained
Template inline void swap (T * x, t * Y) {T temp; temp = * X; * x = * Y; * Y = temp ;} template void quicksort (t list [], int M, int N) {If (M = m) & (list [J]> key) j --; if (I void bubblesort (t r [], int N) // bubble sort {t I, j; t temp;
Show only partial descriptive informationCode
Take the drive letter of the hard drive partition of the system, and use the API function: getdrivetype[Dllimport ("kernel32.dll", entrypoint = "getdrivetype")]Public static extern int getdrivetype
When assigning a common reference parameter to a local variable in the called function, this local variable should be a constant reference variable as much as possible. For example:
Const string & manip (const string & S){Const string ret =
Today, found a good website:Http://www.tiantian.cn/dotnet/Manual/Download.htm
The. NET Resource editor is very simple and easy to use. It is easier to use than Microsoft's reseditor, especially for imagelist resource types!
In addition, convert.
Not much nonsense.Code:
Static void main (string [] ARGs) {object o = new object (); // is usage // 1. check the compatibility of object types and return results, true or false; // 2. no exception is thrown; // 3. if the object is null, the return
Void downloadfrominternet (System: String URL, system: String path) {// create the httprequest request object system: Net: httprequest * request = new system: Net :: httprequest (URL); // If memory permits, the returned pointer is always available
Document directory
I will not elaborate on the large-end and small-end of the byte sequence here. The author assumes that the reader has understood the encoding principle and pasted the Code (for details, see the rlib source code, which is easy
In our ordinary programming, after a long time, sometimes we will form a habitual way of thinking, forming an inherent programming style, but in some places we need to consider it, even a small mistake may lead to a high price. You must learn to sum
There are many SNS communities or SNS-like websites, such as happy, 51, and on-campus websites, however, it is found that most communities do not provide the function of obtaining the friends list of QQ mailbox or QQ space when inviting friends.
/// Function for converting the fullwidth (SBC case) /// any string /// fullwidth string /// // the space is 12288, the half-width space is 32 // The Relationship Between the half-width (33-126) of other characters and the full-width (65281-6537
1. datetime numeric typeSystem. datetime currenttime = new system. datetime ();1.1 take the current year, month, day, hour, minute, secondCurrenttime = system. datetime. now;1.2 get current yearInt year = currenttime. Year;1.3 take the current
Writing DLL using C ++ requires many specifications, while implementing DLL through C # On the. NET platform is much more convenient. But pay attention to calling the DLL written by C # In C ++. It cannot be the same as referencing the DLL of C ++
Cause:
If the machine cannot be started, a large number of prompts are displayed, as shown below:
Invalid boot. ini file
Booting from c: \ windows \
Windows cocould not start because the following file is missing
Or upt:
\ system32 \ Hal. dll
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