iostream


1. Reading and Writing to Standard Input and Output

int main() {
  int x;
  // Read integer from standard input
  cin >> x;
  // Write integer to standard output
  cout << x << endl;
}

2. Accepting Multiple Input Values

int main() {
  int a, b, c;
  // Read three integers from standard input
  cin >> a >> b >> c;
  // Do something with the values
  // ...
}

3. Writing Formatting Output

int main() {
  int x = 1234;
  // Write formatted output to standard output
  cout << "The number is: " << x << endl;
}

4. Reading Input from a File

5. Writing Output to a File

6. Redirecting Input and Output

7. Buffering Output

8. Reading a Line of Text

9. Reading and Writing Binary Data

10. Manipulating File Pointers

11. Error Handling

12. Reading Input from a String

13. Writing Output to a String

14. Using I/O Manipulators

15. Using Locale-Specific Formatting

16. Using Custom Stream Buffers

17. Using Custom Stream Manipulators

18. Using Input and Output Iterators

19. Reading from a Compressed File

20. Writing to a Compressed File

21. Using Memory Streams

22. Using String Streams

23. Reading and Writing Unicode Characters

24. Parsing JSON Data

25. Writing XML Data

26. Reading and Writing Binary Data with Boost Serialization

27. Reading and Writing Binary Data with Qt Serialization

28. Reading and Writing Data with Protocol Buffers

29. Using I/O with Network Sockets

30. Using I/O with Filesystem Operations

31. Using I/O with Compression Libraries

32. Using I/O with Encryption Libraries

33. Using I/O with Logging Libraries

34. Using I/O with Database Libraries

35. Using I/O with HTTP Libraries

36. Using I/O with XML Parsers

37. Using I/O with JSON Parsers

38. Using I/O with CSV Parsers

39. Using I/O with Regex Libraries

40. Using I/O with Data Structures

41. Using I/O with Algorithms

42. Using I/O with Preprocessor Macros

43. Using I/O with Assertions

44. Using I/O with Error Handling

45. Using I/O with Lambdas

46. Using I/O with Scoped Variables

47. Using I/O with Threading

48. Using I/O with Shared Memory

49. Using I/O with Semaphores

50. Using I/O with Mutexes