I start to compile and there is a code error, here is: (unfinished for now)

#include<iostream> #include<stdlib.h> #include<string.h> using namespace std; void check_pass (string password) { string people_pass="Samsung"; if(password==people_pass) { cout<<" Äîñòóï ðàçðåø¸í."<<endl; float prohodka=1; } else { cout<<"Äîñòóï çàïðåù¸í."<<endl; float prohodka=0; } } int main( int argc, char **argv) { setlocale(0,""); float prohodka = 0 do { string user_pass; cout<<"Ââåäèòå ïàðîëü : "; getline(cin,user_pass); check_pass(user_pass); } while(prohodka == 0); system("pause"); return 0; } 
  • You forgot ";" before do. - 0xdb

2 answers 2

skipped ; . It should be like this:

 float prohodka = 0; 
  • Facepalm, Damn, how is that? Thank you, did not notice) - Melant
  • And #include <string> missing ... - Harry
  • Hmm ... he already accepts, but by the way, how does <string> differ from <string.h>? - Melant
  • @Melant is essentially nothing, just a way to find this title. - MrBin
  • @Melant, if .h - then most likely this library came from C, and if not, then C ++. But this is usually. - Node_pro

Add ; in the line float prohodka = 0;