#include
...
string in;
//How do I store a string from stdin to in?
//
//gets(in) - 16 cannot convert `std::string\' to `char*\' for argument `1\' to
You are trying to mix C style I/O with C++ types. When using C++ you should use the std::cin and std::cout streams for console input and output.
#include
#include
...
std::string in;
std::string out("hello world");
std::cin >> in;
std::cout << out;
But when reading a string std::cin stops reading as soon as it encounters a space or new line. You may want to use getline to get a entire line of input from the console.
std::getline(std::cin, in);
You use the same methods with a file (when dealing with non binary data).
std::ofstream ofs('myfile.txt');
ofs << myString;