Export (0) Print
Expand All

internal (Standard C++ Library)

Causes a number's sign to be left justified and the number to be right justified.

ios_base& internal( 
   ios_base& _Str 


A reference to an object of type ios_base, or to a type that inherits from ios_base.

A reference to the object from which _Str is derived.

showpos causes the sign to display for positive numbers.

The manipulator effectively calls _Str.setf(ios_base::internal, ios_base::adjustfield), and then returns _Str.

// ios_internal.cpp
// compile with: /EHsc
#include <iostream>
#include <iomanip>

int main( void ) 
   using namespace std;
   float i = -123.456F;
   cout.fill( '.' );
   cout << setw( 10 ) << i << endl;
   cout << setw( 10 ) << internal << i << endl;

Header: <ios>

Namespace: std

© 2015 Microsoft