1. Use the methods provided by Microsoft's C Runtime Library msvcrt. dll and the functions provided by Win32 API to call the platform.CodeAs follows:
Class program {// Microsoft's C Runtime Library msvcrt. the puts method provided by DLL
1. Obtain the path of the current file1. system. Diagnostics. process. getcurrentprocess (). mainmodule. filenameObtain the complete path of the module, including the file name.2. system. environment. currentdirectoryObtain and set the fully
1. The function of extern "C" is used to tell the compiler that the function is written in C language.Ii. Use the following methods:
1. extern "C" Void exit (INT) // containsC LanguageThe exit function.2. extern "C"
{
Int printf (const char *....)
C # field attribute design in the class
1. When the attribute is designed as a private set, it indicates that the attribute cannot be assigned a value in the external class. For example
Public Class A {string PWD; public event eventhandler
C # out, ref learning summary.
Ref is the address for passing parameters, and out is the return value. There are some similarities between the two, but there are also differences.
You must assign values to variables before using ref.
The out
In summary, generics have the following two advantages over non-generics:
1. More secure
In non-generic programming, although everything can be passed as an object, type conversion is inevitable during the transfer process. Type conversion is not
1. The template class has members who are templates.
# Include # include using namespace STD; Template class Outer {public: Template class inner {public: void F () ;};}; template template void outer :: inner :f () {cout :: inne R Inner;
1. Bubble Sorting
1. Bubble Sorting vertically sorts the sorted record array R [1. N]. Each record R [I] is considered as a bubble with the weight of R [I]. Key. According to the principle that a Light Bubble cannot be under a heavy bubble, scan
C # dictionary usage Summary
1. Usage 1: regular use
Before adding a key-value pair, you must determine whether the key exists. If the key already exists and is not determined, an exception is thrown.Therefore, it is difficult to judge every
1. Conditional interruption
For (INT I = 0; I
Method 1: The Code Execution output must be equal to or equal to 50. When the for loop is executed, the I value is changed to 49 and then executed.
Method 2: set the condition for if (I = 50)
Directory:
1 ,?? Operator usage
2. getenumerator Method
3. The ResourceManager. getstring method obtains the characters of resources.
4. Get the characters of the settings file.
I ,?? It may be a forgotten operator, which is rarely used. Its usage
1. stable_partition: stable division and unstable division.
# Include # include # include using namespace STD; struct student {char name [20]; int age ;}; ostream & operator (cout ,"")); cout VEC (Stu, Stu + 4); partition (VEC. begin (), VEC.
Based onVisual c ++ 6.0OfDLLProgramming implementation
I. Preface
Since Microsoft launched a 16-bit Windows operating system, every version of Windows operating system is dependent on functions and data in the dynamic link library (DLL, in fact,
Usage 1. Checked and unchecked An "overflow exception" -- system. overflowexception is not really an "exception" in some algorithms. On the contrary, such overflow is often used by programs. C # introduce the checked and unchecked keywords to
Some of the files in the unmanaged VC project use the. NET framwork original address to use the vs2005 environment, and the project does not use and compile the header file stdafx. H. (Yes, you cannot find me !)
1. Create a General C ++ console32
[Transfer] http://blog.csdn.net/maotin/archive/2008/09/25/2977138.aspx
C #3.0 New Experience (3)
Maotin
20080925
Preface:
Every day, I got up very early and spent nearly 1.5 hours traveling to the company. At night, I got home from work after. Every
Many programs run independently, and then perform various operations. Today, we will try a program like a player. We will customize some file types and then associate them with our own software. Double-click to open the file and pass it into the
1. Create an M file (test. m) in MATLAB)
For example:Function Test (H, d)For x =, If X & gt; d Y = h; Hold on; Plot (x, y) Elseif X & lt;-d Y =-h; Hold on; Plot (x, y) Else Y = H/(d * X ); Hold
Shortcut Toolbar Control:AppBar
You can specify the topappbar or bottomappbar of the page to set the AppBar of the page, which is usually used to display a
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