Iostream

iostream es un componente de la biblioteca estándar (STL) del lenguaje de programación C++ que es utilizado para operaciones de entrada/salida. Su nombre es un acrónimo de Input/Output Stream. El flujo de entrada y salida de datos en C++ (y su predecesor C) no se encuentra definida dentro de la sintaxis básica y se provee por medio de librerías de funciones especializadas como iostream. iostream define los siguientes objetos:

  • cin : Flujo de entrada
  • cout : Flujo de salida
  • cerr : Flujo de error no almacenado.
  • clog : Flujo de error almacenado.

Todos los objetos derivados de iostream forman parte del espacio de nombres std.

Ejemplo

El clásico programa Hola Mundo puede ser expresado en C++ utilizando iostream:

#include <iostream> 
int main()
{
    std::cout << "¡Hola, mundo!";
    return 0;
}

Enlaces externos

«CppReference - Input/output library» (en inglés). Consultado el 17 de abril de 2012. 

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.