#include <iostream>
#include <string>
#include <locale.h>
#include <vector>
using namespace std;
int main(int argc, char const *argv[])
{
setlocale(LC_CTYPE, "Polish");
int cyfra;
string słowo, a;
cout<< "Podaj jedno, dowolne słowo: ";
cin>> słowo;
string zdanie(słowo);
int y = słowo.length();
cout<<"Podany ciąg składa się z "<< y <<" znaków."<<endl;
cin.get();
cout<< "Podaj dowolną cyfrę nie większą niż "<<y<< ": " ;
cin>> cyfra;
std::vector<char> tab(słowo.begin(), słowo.end());
for(char i : tab)
cin >> i << endl;
do{
cout<<i;
}while(i<=cyfra);
return 0;
Mam problem, otóż:
Wyskakuje błąd "syntax error : missing ' , ' before ' : ' ". Dokładnie chodzi o linijkę for(char i : tab)
Czym to może być spowodowane ewentualnie jak to rozwiązać?