# Include # include using namespace STD; void main () {int intvalue [5] = {1, 2, 4, 5}; int * result; result = find (intvalue, intvalue + 4, 8); If (result! = Intvalue + 4) {cout
Test results:
1) the corresponding value exists in the array,
1. Int main (INT argc, char ** argv)
Argc: an integer used to count your runProgramNumber of command line parameters sent to the main function
* Argv: String Array, used to store a pointer array pointing to your string parameters. Each element
/*************************************** ***************** Author: Peng Xiaolin* Copyright: All Rights Reserved. You can skip this article]* Function: test the default parameters of the constructor.**************************************** ***********
/*************************************** ***************** Author: Peng Xiaolin* Copyright: All Rights Reserved.* Function: Class parameter construction sequence. destructor sequence Parameter Test**************************************** ************
/*************************************** ***************** Author: Peng Xiaolin* Copyright: All Rights Reserved.* Function: initialization example of class member constants and references**************************************** **************/
#
Author: Peng Xiaolin
1. Watch the video tutorial (the tutorial on this URL below is quite good)
Web: http://pcedu.pconline.com.cn/videoedu/asp/0906/1682266_1.html
2. Reading Books
C ++ primer C ++ProgramThe key to the design tutorial is that
TestCode:
# Include Class A {public: A (INT _ V1, int _ V2): V1 (2), V2 (3) {v1 = _ V1; // breakpoint1v2 = _ V2;} A () {// breakpoint2} PRIVATE: int V1; int V2 ;}; Class B {public: B (): V1 (2 ), v2 (3), avalue (1, 2) {v1 = V1; // breakpoint3}
/*************************************** ***************** Author: pengxiaolin* Copyright: All Rights Reserved. You can skip this article]* Function: test the default function parameters.**************************************** **************/
#
In C, users can use three types of storage space: program area, static storage area, and dynamic storage area.
The program stores machine commands of executable programs;
The static storage area stores the variables of the fixed storage units
The first impression given by const is to define constants.
(1) const is used to define constants.
Example: const int N = 100; const int M = 200;In this way, as long as N and M are used in the program, they represent integer 100, 200, and N and M as
For common objects, copying between them is very simple, for example:Int A = 88;Int B =;Different from common objects, class objects have complicated internal structures and various member variables. The following is a simple example of copying a
Computer content: Writing and running C ++ programs
Objective: To understand the general process of editing, compiling, connecting and running a simple C ++ Program
My program:
/** Copyright (c) 2011, School of Computer Science, Yantai
Computer content: Writing and running C ++ programs
Objective: To understand the general process of editing, compiling, connecting and running a simple C ++ Program
My program:
/** Copyright and version statement of the program: * copyright (c) 20
Computer content: Writing and running C ++ programs
Objective: To understand the general process of editing, compiling, connecting and running a simple C ++ Program
My program:
/** Copyright and version statement of the program: * Copyright (c) 20
Before selecting a major, I was worried. I was afraid that programming would be difficult and I was afraid that I could not keep up with myself. For this reason, I asked many teachers in this field. They all told me that they all learned from the
Given the year, month, and day of the two days, calculate the number of different days, and the year is small to large.
# Include // for a given year, month, and day, calculate the number of days that have passed in the year int total_day (int
# Include using namespace STD; Template class templateclasstest {public: templateclasstest (T & Ina, T & INB): A (INA), B (INB) {} T & geta (); T & getb (); Private: t a; t B;}; Template T & templateclasstest : geta () {return a ;}template T &
/*************************************** ***************** Author: pengxiaolin* Copyright: All Rights Reserved.**************************************** **************/
# Include # Include
Using namespace STD;
Class add{
Public:Void sum (int A, int
/*************************************** ***************** Author: PengXiaoLin* Copyright: All Rights Reserved. You can skip this article]* Function: test the default parameters of a member function.**************************************** **********
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