ld returned exit 1 is a cryptic message for sure. You will want to start searching the web for things like this, but in short this message tells you that building your program failed due to an error -- in your original code it was because the code is wrong: vector does not have a stream overload (>> and << for files, cout, cin, etc are stream operators).
Let me break it down for you.
when we try to run the code in the first post you made, we get a spew of stuff like this:
main.cpp:11:7: error: invalid operands to binary expression ('istream' (aka 'basic_istream<char>') and 'vector<string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char>>>'))
cin >> dialogue;
~~~ ^ ~~~~~~~~
/root/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/cstddef:153:3: note: candidate function template not viable: no known conversion from 'istream' (aka 'basic_istream<char>') to 'byte' for 1st argument
operator>> (byte __lhs, _Integer __shift) noexcept
^
/root/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/istream:670:1: note: candidate function template not viable: no known conversion from 'vector<string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char>>>') to 'unsigned char &' for 2nd argument
operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c)
^
/root/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/istream:678:1: note: candidate function template not viable: no known conversion from 'vector<string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char>>>') to 'signed char &' for 2nd argument
operator>>(basic_istream<char, _Traits>& __is, signed char& __c)
^
/root/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/istream:635:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'vector<string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char>>>'))
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
^
/root/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__random/uniform_int_distribution.h:269:1: note: candidate template ignored: could not match 'uniform_int_distribution' against 'vector'
operator>>(basic_istream<_CharT, _Traits>& __is,
^
/root/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/istream:578:1: note: candidate template ignored: could not match '_CharT[_Np]' against 'vector<string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char>>>')
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np])
^ |
but when dealing with syntax errors, one error often triggers many, many messages!
What is best, 99.9 % of the time, is to fix only the topmost error and try again. If you are working on a giant project that takes a very long time to compile, that rule can be changed to deal with the issue, but for now, focus on the topmost error.
So, we see this at the top:
main.cpp:11:7: error: invalid operands to binary expression ('istream' (aka 'basic_istream<char>') and 'vector<string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char>>>'))
cin >> dialogue;
that tells me (it takes a while to be able to read this junk, you will learn it in time) that your
file main.cpp has a problem on line 11, column 7. The problem is that the operands are invalid. Ok, there is only one operation here: the >> operator (its an operator same a + and -, in c++ terms) is not getting the parameter it wants. Which cycles back to what I already told you: that vectors do not directly work with cin and cout. NONE of the C++ containers work directly with I/O streams. Its just something you should probably learn, but if you wanted to figure it out, you can look up vector in a reference and see what it supports: note that operator << and >> are not listed.
Thusly armed (the error is the stream operator and that isn't supported by vector) you now know that you need to do something else on that line to accomplish what you want to do.
The ld exit status is NOT very interesting, note. It tells you that your program did not build, and nothing more. exit of 0 means success in c++ and operating systems generally (hence the return 0 in main if things went well).
finally, looking at vector here:
https://cplusplus.com/reference/vector/vector/
note that it lists 'operator =' but not 'operator <<' or 'operator >>'
now look at string:
https://cplusplus.com/reference/string/string/
down in the 'non member function overloads' section, you see this:
operator>> Extract string from stream (function)
operator<< Insert string into stream (function)
so you can use >> and << with a string variable, but not a vector variable.