/*************************************** * ****************/# Include # include # include /************************************* * *****************/# define ok1 # defineerror0 # definetrue1 # definefalse0typedefintelemtype; // data type
To set a block of memory to a specified value, it is easier than memset. However, it requires that pattern be a byte. If you want to set a wide point type, such as an integer, therefore, memset cannot be used unless it is set to 0 or-1 or other
Moved to: http://www.wypblog.com/archives/184
C ++ allows you to specify the type parameter in the template class as a charming type. For example, you can assign int to the type parameter T in the general class Stack as the default type, as shown
I did nothing, so I wrote the commonly used sorting algorithms myself and thought it as a review.
/*************************************** * **************************** Date: 2012. 05. 03 ** Author: 397090770 ** Email: *****************************
# Include "sqlist. H "# include # include int main () {// test case int data_a [] = {2, 3, 6, 10, 30}; int data_ B [] = {2, 4, 9, 11, 40, 90 }; int I = 0; Int J = 0; int ELEM = 0; int pre_e; int next_e; // initialize the sequence table, test
In the C language, the literal meaning of static can easily lead us astray. In fact, it has three functions. (1) first role: Hide. When we compile multiple files at the same time, all global variables and functions without the static prefix are
/** Chat_client.h** Created on: 2012-4-19* Author: root*/
# Ifndef CHAT_CLIENT_H _# Define CHAT_CLIENT_H _# Include # Include # Include # Include # Include # Include # Include Using namespace std;# Include # Include # Define IP "127.0.0.1"# Define
Delphi font length/Value Field C ++
Shortint 8-bit signed integer signed CharSmallInt 16-bit signed integer shortLongInt 32-bit signed integer intByte 8-bit unsigned charWord 16-bit unsigned shortInteger 32-bit signed integer intCardinal 32-bit
Http://bbs3.chinaunix.net/viewthread.php? Tid = 1631299 this article describes how to understand the pointer in C language. Although the landlord understands the pointer, he is a little excited and his point of view is incorrect.
C language does not
Translated from http://www.imwls.com/c-delegate-threading/, this article is well written and used for sharing.
I have recently written that two programs use multiple threads, but because the main thread UI needs to be called, errors always occur.
New Expression
This is the most common usage, for example:
class A{ int a; };A* array = new A[101];
Global operator new
This is a default operator function prepared by the C ++ standard library for programmers. It returns an object memory, but
1. undefinedreference to '_ gxx_personality_v0'
The compiler uses gcc. Replace it with g ++.
2. Change a source file from. cpp to. cc and re-make. No dependency is found and no rules can be generated.
Go to the. deps/folder and modify the file
We all know that using printf (xxx) and fprintf (stdin, xxx) is an effect. Therefore, stdin is a FILE * type variable. The same is true for stdout and stderr.
They are defined in stdio. h (GNU Implementation). Some of the Code is as follows:
/*
1. Calling strtok will modify the parameters you entered.
I just made a mistake, that is, calling strtok first and then checking the string. The result is not as expected.
// Error char buf [256] = "0,100"; char * res = strtok (buf ,",;"); if (buf [
A c ++ library will be created in the near futureSource:# Include Extern "C" int main (int argc, char * argv []);Extern "C" void text_puts (int x, int y, const char * str, char c );
Int main (int argc, char * argv []){Text_puts (20, 10, "Jicama OS
In the last book, if the system uses the C language to determine the byte storage sequence of Little endian and Big endian, the function is as follows:
#include #include #include union TestEndian_Unit {
How to share a bunch of bit operations:
// -----------------------------------------------------------------------// ////// File Name : UInt64MaskHelper.cs// Description : Helper class to support UInt64 bit mask.// Project
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