I'm attempting to cast ASCII numbers to their corresponding letters of the alphabet using a sentinel controlled loop.
The compiler gives me the error next to cout:
Invalid operands to binary expression
('std::__1::ostream' (aka 'basic_ostream<char>') and 'vector<char>')
I'm using XCode. This is my current code:
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
int num;
char intermediary;
vector<char> Letters;
cin>>num;
while (num!= -1){
intermediary=char(num);
Letters.push_back(intermediary);
cin>>num;
}
cout<<Letters<<endl;
return 0;
}