Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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 
);
_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;
}
..-123.456
-..123.456

Header: <ios>

Namespace: std

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.