1. convert other data types to strings
Short INTEGER (INT)ITOA (I, temp, 10); // convert I to a string and put it into temp. the last digit indicates decimal.ITOA (I, temp, 2); // convert in binary mode
Long (long)Ltoa (L, temp, 10 );
Floating
Format description
Name
Description
D
Short date mode
Displays
The pattern defined by the datetimeformatinfo. shortdatepattern attribute or the pattern defined by the provider in the specified format.
D
Long date
1. Extract substrings from stringsThe stringbuilder class does not support substrings. Therefore, the string class must be used for extraction.
String mystring = "My name is ynn .";
// Displays "name is ynn ."
Console. writeline (mystring. substring
# Important
(1) When using gcc for compilation, you must add"-G"Parameter
CC-G main. C-o mainG ++-G main. cpp-O main
(2) Before using GDB for debugging, you must first enter the directory where the module to be debugged is located (so that the
Those who are new to VC programming are often puzzled by the conversion of many data types. This article will introduce some common dataType.
Let's first define some common type variables to illustrate
Int I = 100;Long L = 2001;Float F =
The printf function is called the format output function. The last letter of the keyword F indicates "format. The function is to display the specified data to the display screen in the format specified by the user.General Form of printf function
Process and program processes and programs
Program: a binary program is typically copied to a storage medium and exists as a physical file.
Process: After a program is triggered, the executor's permissions and attributes, program code, and required
Nsnumber The numeric type cannot be saved to a set or dictionary and must be converted to an object. Use nsnumber (taking the int type as an example, there are many other types of methods. For usage, refer to the following code)
// Convert integers
use the dataformatstring attribute to provide custom formats for each item in the column. A data format string consists of two parts separated by a colon. The format is {A: bxx }. For example, the formatted string {0: F2} displays the number of
Conversion of common VC Data TypesReader level: BeginnerThose who are new to VC programming are often confused about the conversion of many data types. This article will introduce the use of some common data types.
Let's first define some common
Conversion methods for various file encoding in MacOSX
How long was it when the cat was still coding in windows? At that time, the ruby source code encoding formats were all gbk! As a result, more than N Chinese characters are displayed as garbled
MongoDB import, export, backup, recovery, user authorization (4), mongodb ImportV. MongoDB import, export, backup, recovery, and user authorizationI. Data export and Data ImportAs a DBA (Administrator), you often need to import and export data. The
Batch Processing instance code tutorial
--------------------------------------------------------------------------------
Batch Processing Program deletes itself. bat
Echo sometimes we need to delete the batch processing program after the execution
This section describes how to use the following four examples: Export (out), import (in), query and export (queryout), and export and format (-f) files.Example 1: export the entire table currency or view of the sample database AdventureWorks, and
1. File Open
Open mode:
f = open (' Test.txt ', ' R ')
#r, read-only mode, error when file does not exist
f = open (' Test.txt ', ' W ')
#w, write-only mode, the file does not exist when the file is created, when the file exists, empty the original
I am going to have a LinuxIO training in the company in the near future. I will sort out the relevant materials and share with you the position of various I/O monitoring tools in the LinuxIO Architecture & nbsp
I am going to have a Linux I/O
1. Through the API function GetPixel (), get the color value of a point;var pt:tpoint; C : TColor; Dc:hdc;begin GetCursorPos (PT); DC: = GetDC (0); C: = GetPixel (DC,PT.X,PT.Y); Self.color: = C; Set the form color edit1.text: =
When we write the program, we often encounter the problem of integer type and string conversion, here to use a few functions, itoa (), Atoi (), sprintf () below to introduce the specific use of these functions!ItoaFunction: Converts an integer to 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.