#include <iostream>
string imie; int liczba;
using namespace std;
int main()
{
cout<< "Jak masz na imię?";
cin>> imie;
cout<< "Podaj liczbe";
cin>> liczba;
for (int i=1; i<=liczba; i++)
{
cout<<i<<"."<<imie<<endl;
}
return 0;
}
Mam problem z pętlą for, nie wiem gdzie leży błąd.
||=== Build: Debug in pętla (compiler: GNU GCC Compiler) ===|
C:\Users\User\Desktop\pętla\main.cpp|4|error: 'string' does not name a type|
C:\Users\User\Desktop\pętla\main.cpp||In function 'int main()':|
C:\Users\User\Desktop\pętla\main.cpp|12|error: 'imie' was not declared in this scope|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|