Flag Constants for iOS

Source: Internet
Author: User

1 Dec

2 fixed

3 hex

4 Internal

5 left

6 Oct

7 Right

8 Scientific

9 Showbase

Ten Showpoint

Showpos

Skipws

Stdio

Unitbuf

Uppercase

1 Dec

Convert the base system to decimal

1#include <iostream>2 3 voidMain ()4 {5     intnum =01070;//octal6 7Std::cout << num << std::endl;//Output Decimal8 9Std::cout << Std::hex;//hex Mandatory ID, Endl endTenStd::cout << num << std::endl;//Output Hex One  AStd::cout << std::oct;//octal mandatory identification, Endl not end -Std::cout << num << std::endl;//output octal -  theStd::cout << std::d EC;//decimal -Std::cout << num << std::endl;//Output Decimal -  -System"Pause"); +}

2 fixed

Display floating point numbers in fixed-point form

3 hex

Convert base to hexadecimal

4 Internal

Fill in characters after symbol bit and base indicator

5 left

Left-aligned output

1#include <iostream>2 3 voidMain ()4 {5Std::cout.width ( +);//set the width of the display6Std::cout.fill ('&');//Fill character7STD::COUT.SETF (Std::ios::left);//Align Left8 9Std::cout <<"Hello World"<<Std::endl;Ten  OneSystem"Pause"); A}

6 Oct

Convert Base to Octal

7 Right

Right-aligned output

8 Scientific

Display of floating-point numbers by scientific method of indication

9 Showbase

Show base indicator in output

Ten Showpoint

Show decimal point at output

Showpos

Positive integer Plus "+" number

Skipws

Skip whitespace in the input

Stdio

Refresh stdout and Stdree after output operation

Unitbuf

Flush stream immediately after output operation

Uppercase

Hexadecimal output with uppercase letters

Flag Constants for iOS

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.