Compartir a través de


ios_base::sync_with_stdio

Ensures that iostream and C run-time library operations occur in the order that they appear in source code.

static bool sync_with_stdio(
   bool _Sync=true
);

Parameters

  • _Sync
    Whether all streams are in sync with stdio.

Return Value

Previous setting for this function.

Remarks

The static member function stores a stdio sync flag, which is initially true. When true, this flag ensures that operations on the same file are properly synchronized between the iostreams functions and those defined in the Standard C++ Library. Otherwise, synchronization may or may not be guaranteed, but performance may be improved. The function stores _Sync in the stdio sync flag and returns its previous stored value. You can call it reliably only before performing any operations on the standard streams.

Requirements

Header: <ios>

Namespace: std

See Also

Reference

ios_base Class

iostream Programming

iostreams Conventions

Other Resources

ios_base Members