i want to send data f char array from main function to a istream member of a class as following code:
class StreamClass {
public:
std::shared_ptr<std::istream> istream_ptr;
};
int main(){
StreamClass sc;
char charArray[] = "hello world";
sc.istream_ptr = std::make_shared<std::istream>(nullptr);
}
i read this link Get an istream from a char* . However i want to do it without coding anything manually , just using simple std functions. is it possible.