So, I'm using dev-C ++, the compiler works fine, simple Hello World program is almost a dozen Works with other simple programs. This is the work progress on which I am working for the class.
It is compiled for me but it never runs, what is wrong with it?
#include & lt; Iostream & gt; # Include & lt; Vector & gt; # Include & lt; Cstdlib & gt; # Include & lt; Algorithm & gt; using namespace std; Zero getNames (vector & lt; string & gt; vectorName, int and last, string temp); Int main () {Vector & lt; String & gt; Name; String tmp; Int last = 0; Names (name, final, TMP); For (int j = 0; j & lt; final; j ++) {cout < & Lt; Names.at (j) & lt; & Lt; Endl; } System ("PAUSE"); Return EXIT_SUCCESS; } Zero getNames (vector & lt; string & gt; vectorName, int and last, string temporary) {while (true) {cout & lt; & Lt; "Enter a name (skip it):"; Cin & gt; & Gt; Temporary; Break if (temp == "left"); VectorName.push_back (temporary); Last = Vector Name (.); }}
The program must be unable to link because this definition can not be found Is:
zero getNames (vector & lt; string & gt; and vectorName, int and last, string temp);
That's because you have the Add to & amp; Missing:
zero getNames (vector & lt; string & gt; vectorName, int and last, string temporary) {^^^^^^^^^^ ^
& amp;
and it should compile and run just fine.
Comments
Post a Comment