The reason you are not allowed to copy a stream is that it doesn’t make sense to copy a stream. If you explain what it is that you are trying to do, there’s certainly a way to do it. If you want a chunk of data you can copy, use a string. But a stream is more like a connection than a string.
More Related Contents:
- "imspossible" error on a simplest code [closed]
- g++ crashed when I tried to compile a program with ONE LINE
- warning C4018: '<' : signed/unsigned mismatch [closed]
- Why vector::reference doesn’t return reference to bool?
- problem sorting using member function as comparator
- Setting the internal buffer used by a standard stream (pubsetbuf)
- How to get error message when ifstream open fails
- Can’t set value of static object field (error LNK2001: unresolved external symbol)
- Read binary data from std::cin
- Template issue causes linker error (C++) [duplicate]
- Detecting the parameter types in a Spirit semantic action
- StdAfx + Header file – Order of inclusion in MFC application
- “not declared in this scope” error with templates and inheritance [duplicate]
- Why does ostream_iterator not work as expected?
- Why can’t “transform(s.begin(),s.end(),s.begin(),tolower)” be complied successfully?
- Order of execution in operator
- Why does gcc allow char array initialization with string literal larger than array?
- How does std::copy work with stream iterators
- Initializing container of unique_ptrs from initializer list fails with GCC 4.7
- Why statements cannot appear at namespace scope?
- Public operator new, private operator delete: getting C2248 “can not access private member” when using new
- Fatal error: “No Target Architecture” in Visual Studio
- error::make_unique is not a member of ‘std’
- Is there a standard date/time class in C++?
- Interesting behavior of compiler with namespaces
- Can I use #include “pch.h” instead of #include “stdafx.h” as my precompile header in Visual Studio C++?
- How do I call a pointer-to-member-function?
- std::ofstream, check if file exists before writing
- Assert that code does NOT compile
- SFINAE tried with bool gives compiler error: “template argument ‘T::value’ involves template parameter” [duplicate]