Use of C + + macros

The complete code for using the macro is as follows:Macrodemo.h file:1 #pragmaOnce2 #ifndef __macrodemo__3 #define__macrodemo__4#include 5#include 6 using namespacestd;7 #define__debug__//(5)8 #defineMAX 1000//(1)9 #defineMax_fun (a) //(2)Ten

Select Sort--c Implementation

Select Sort:Select sort (Selection sort) is a simple and intuitive sorting algorithm. It works as follows. First find the smallest (large) element in the unordered sequence, place it at the beginning of the sort sequence, and then continue looking

C++11 new Features

C++11 new FeaturesC++11 has been introduced for three years (2011), the compiler GCC4.7, Clang3.1 in 2012 has been gradually intact, VS2013 has supported the relevant features, GCC4.8.1 support all features. It's just that the new features don't

Design mode--Enjoy meta mode (c + + implementation)

1#include 2#include string>3#include 4#include 5#include 6#include 7 8 using namespacestd;9 Ten classUser One { A Public: -User (stringstrName): M_strname (strName) - { the - } - - stringGetName ()Const + { -

C + + code tank Wars (1)

The battle for tanks is due to the first time the university participated in the program design competition to do this game. The language I used was Java, and that game made me realize the power of object-oriented, and I started to touch design

C + + Internal classes

In-house:#include  using namespace std;class CPeople{public:     Int a;    cpeople ( int a )     {         this->a = a;    }private:     class Kayer    {    public:         int a;        CPeople* cp;         kayer (cpeople* p) :CP (p)          {     

C++primer Reading notes 11-polymorphic

Polymorphism is also an important aspect of C + +. Polymorphic and dynamic types, virtual functions essentially refer to the same thing.1 Virtual functionsThe function of a member function in a class preceded by the virtual surface is a virtual

C + + STL Learning queue

This article modifies the self http://www.cnblogs.com/hdk1993/p/5809180.html1. Use queue to declare header file # include 2, the queue template class requires two template parameters, one is the element type, a container type, the element type is

Smart pointers in C + +

well known. The application and release of heap memory in C + + is completely controlled by the user, which causes the user to use the memory leak, the wild pointer, the repeated release and other common hang-up problems, so we need to provide a set

C + + Primer Note two

3rd standard library Type1. The variable type that stores the result of the size operation of the string must be of type String::size_type.2. Similarly, the size value of the stored vector should use a type variable similar to Vector::size_type3.

2017 eighth annual Blue Bridge Cup C + + Group B provincial race-linear prime number column

标题:等差素数列2,3,5,7,11,13,....是素数序列。类似:7,37,67,97,127,157

Question 1040:c Language Programming tutorial (third Edition) after class exercise 9.6

/******************************************************************** @file main.cpp@date 2017-05-28 21:57:02@au Thor Zoro_tiger@brief Problem 1040:c Language Programming Tutorial (third Edition) after class exercise

Question 1039:c Language Programming tutorial (third Edition) after class exercise 9.4

/******************************************************************** @file main.cpp@date 2017-05-28 21:48:29@au Thor Zoro_tiger@brief Problem 1039:c Language Programming Tutorial (third Edition) after class exercise

"Turn" a collection of C #

The size of the array (http://www.cnblogs.com/afei-24/p/6738128.html) is fixed. If the number of elements is dynamic, the collection class should be used.List (http://www.cnblogs.com/afei-24/p/6824791.html)Queue (http://www.cnblogs.com/afei-24/p/6829

C # XML output Annotation format control

String Str= "\n\t///*! Makeup Category Items Sub-category */\n\tenum Makeupsubtype\n\t{\n\t\titem_invalidmakeupsubtype = -1,\t\t\t\t\t\t/*!The above string is a well-formatted text obtained from notepad++ directly to MonoDevelop,with xmlcomment

C # JSON serialization and deserialization

Using System.web.script.serialization;public class jsonhelper{public static string objecttojsonstring ( T t) { JavaScriptSerializer js = new JavaScriptSerializer (); Serialization method: Converts a T type object to a JSON string

C # Request HTTP Address

Using system;using system.io;using system.net;using system.text;public class httputil{Private Const string Scontenttyp E = "application/x-www-form-urlencoded"; Private Const string suseragent = "mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2

C # timed Tasks

public class Startup{public void Configuration (Iappbuilder app){Specify hangfire to use memory store background task informationGlobalConfiguration.Configuration.UseMemoryStorage ();App. Usehangfireserver ();App. Usehangfiredashboard ();Setjobs ();}

A brief analysis of smart pointers in C + +

I. OverviewAs a result of more recent exposure to this piece of code, it is necessary to make a summary.It is well known that heap memory allocation and release in C/S + + is mainly: Malloc/free and new/delete, but these methods are more demanding

Nbody Barnes-Hut implementation, nbodybarnes-hut

Nbody Barnes-Hut implementation, nbodybarnes-hut   Barnes-Hut Algorithm Reference http://arborjs.org/docs/barnes-hut This algorithm performs 4 segmentation on the region. Until the region contains only one or zero elements. For example The

Total Pages: 5902 1 .... 5146 5147 5148 5149 5150 .... 5902 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.