Skocz do zawartości

trek

Użytkownicy
  • Postów

    4
  • Dołączył

  • Ostatnia wizyta

Osiągnięcia trek

Chicken

Chicken (1/13)

0

Reputacja

  1. trek

    Problem z kodem.

    To jak zrobic by mozna bylo wpisac ile sie chce slow ?
  2. trek

    Problem z kodem.

    Ale jak wpisze np. slowo1 slowo2 to juz nie moge wpisac o ile przesunac
  3. trek

    Problem z kodem.

    Compiling... szyfrowanie.cpp D:\Documents and Settings\Piotr.D\Pulpit\projekty c++\szyfrowanie\szyfrowanie.cpp(22) : error C2664: 'class std::basic_istream<char,struct std::char_traits<char> > &__thiscall std::basic_istream<char,struct std::char_traits<char> >::getline(char *,i nt)' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Error executing cl.exe. szyfrowanie.exe - 1 error(s), 0 warning(s)
  4. trek

    Problem z kodem.

    Witam. Mam taki oto kod i przy kompilacji wyskakuje jeden blad #include <iostream> #include <string> #include <cstdlib> #include <windows.h> #include <ios.h> using namespace std; int main() { int numer; cout<<"1 - Szyfrowanie\n2 - Odszyfrowywanie\nCo chcesz wykonac?? "; cin>>numer; if(numer==1) { string tekst, zaszyfrowany; int przesuniecie; cout<<"Podaj tekst do zaszyfrowania:"<< endl; cin.getline(tekst, 699); cout<<"Podaj o ile przesunac: "; cin>>przesuniecie; zaszyfrowany.resize(tekst.size()); for (unsigned int i=0; i<tekst.size(); ++i) zaszyfrowany[i]=(tekst[i]+przesuniecie)%256; cout<<"\nTekst zaszyfrowany: "; SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_INTENSITY); cout<<zaszyfrowany; } else if(numer==2) { } else if(numer>=3) { cout<<"Przykro mi ale niema polecenia o takim numerze\n"; } getchar(); return 0; } Moze ktos wie co jest nie tak??
×
×
  • Dodaj nową pozycję...