prog.cpp: In function 'int main(int, char**)':
prog.cpp:12:5: error: 'string' was not declared in this scope
string line, field, junkText;
^
prog.cpp:12:5: note: suggested alternative:
In file included from /usr/include/c++/4.9/iosfwd:39:0,
from /usr/include/c++/4.9/ios:38,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.9/bits/stringfwd.h:62:33: note: 'std::string'
typedef basic_string<char> string;
^
prog.cpp:13:13: error: 'randNum' was not declared in this scope
string* randNum = new string[arraylen];
^
prog.cpp:13:27: error: 'string' does not name a type
string* randNum = new string[arraylen];
^
prog.cpp:14:13: error: 'phrase' was not declared in this scope
string* phrase = new string[arraylen];
^
prog.cpp:14:26: error: 'string' does not name a type
string* phrase = new string[arraylen];
^
prog.cpp:16:5: error: 'ifstream' was not declared in this scope
ifstream randomTxt;
^
prog.cpp:16:5: note: suggested alternative:
In file included from /usr/include/c++/4.9/ios:38:0,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.9/iosfwd:157:34: note: 'std::ifstream'
typedef basic_ifstream<char> ifstream;
^
prog.cpp:17:5: error: 'i' was not declared in this scope
i= 0;
^
prog.cpp:20:5: error: 'randomTxt' was not declared in this scope
randomTxt.open("random.txt");
^
prog.cpp:24:27: error: 'line' was not declared in this scope
getline(randomTxt,line);
^
prog.cpp:25:9: error: 'stringstream' was not declared in this scope
stringstream ss(line);
^
prog.cpp:25:9: note: suggested alternative:
In file included from /usr/include/c++/4.9/ios:38:0,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.9/iosfwd:151:37: note: 'std::stringstream'
typedef basic_stringstream<char> stringstream;
^
prog.cpp:26:9: error: 'nextstep' was not declared in this scope
nextstep = 0;
^
prog.cpp:27:23: error: 'ss' was not declared in this scope
while(getline(ss,field,','))
^
prog.cpp:27:26: error: 'field' was not declared in this scope
while(getline(ss,field,','))
^
prog.cpp:29:13: error: 'cout' was not declared in this scope
cout << i << endl;
^
prog.cpp:29:13: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.9/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
prog.cpp:29:26: error: 'endl' was not declared in this scope
cout << i << endl;
^
prog.cpp:29:26: note: suggested alternative:
In file included from /usr/include/c++/4.9/iostream:39:0,
from prog.cpp:1:
/usr/include/c++/4.9/ostream:564:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^
prog.cpp:52:25: error: 'temp1' was not declared in this scope
string* temp1 = new string[arraylen_new];
^
prog.cpp:52:37: error: 'string' does not name a type
string* temp1 = new string[arraylen_new];
^
prog.cpp:53:25: error: 'temp2' was not declared in this scope
string* temp2 = new string[arraylen_new];
^
prog.cpp:53:37: error: 'string' does not name a type
string* temp2 = new string[arraylen_new];
^
prog.cpp:54:56: error: 'copy' was not declared in this scope
copy(randNum, (randNum+arraylen), temp1);
^
prog.cpp:54:56: note: suggested alternative:
In file included from /usr/include/c++/4.9/bits/locale_facets.h:48:0,
from /usr/include/c++/4.9/bits/basic_ios.h:37,
from /usr/include/c++/4.9/ios:44,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.9/bits/streambuf_iterator.h:293:5: note: 'std::copy'
copy(istreambuf_iterator<_CharT> __first,
^
prog.cpp:55:27: error: 'UPCsale' was not declared in this scope
delete [] UPCsale;
^
prog.cpp:59:27: error: type '<type error>' argument given to 'delete', expected pointer
delete [] phrase;
^
prog.cpp:64:9: error: 'cout' was not declared in this scope
cout<<"test"<<endl;
^
prog.cpp:64:9: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.9/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
prog.cpp:64:23: error: 'endl' was not declared in this scope
cout<<"test"<<endl;
^
prog.cpp:64:23: note: suggested alternative:
In file included from /usr/include/c++/4.9/iostream:39:0,
from prog.cpp:1:
/usr/include/c++/4.9/ostream:564:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^
prog.cpp:68:5: error: 'sales' was not declared in this scope
sales.close();
^