I want to initialize a char array using pointers, on the fly.That is user giving input do not know the size of array.User keeps on giving input until return is pressed.Condition here is to:
- Use pointers to initialize
- Not to pass size of array in advance.
Assuming a C question, how about (untested):
If it’s really a C++ question you want
std::getlinewith astd::string.