security

hello does anyone know what the error on line 29 is?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#include <iostream>
#include <windows.h>
#include <string>
#include <fstream>
#include <conio.h>
#include <algorithm>

using namespace std;


int decrypt(string _password);
int encrypt(string _password);

int main()
{

    string username, password;
    long long lenght;
    ofstream name("username.nme");
    ofstream pass("password.pwd");

    cout<<"Registration\n*************\n";
    cout<<"Enter your username: ";
    getline(cin, username);
    cout<<"Enter your password: ";
    getline(cin, password);
    lenght = password.size();
    while(lenght >= 0){
        encrypt(_password);
        lenght--;
    }

    name << username;
    pass << password;

    system("cls");



    system("pause");
    return 0;
}


int decrypt(string _password){

        replace(_password.begin(), _password.end(), '•', 'a');
        replace(_password.begin(), _password.end(), 'µ', 'b');
        replace(_password.begin(), _password.end(), '', 'c');
        replace(_password.begin(), _password.end(), 'ü', 'd');
        replace(_password.begin(), _password.end(), '‰', 'e');
        replace(_password.begin(), _password.end(), '¢', 'f');
        replace(_password.begin(), _password.end(), '¼', 'g');
        replace(_password.begin(), _password.end(), '', 'h');
        replace(_password.begin(), _password.end(), 'Ž', 'i');
        replace(_password.begin(), _password.end(), 'Û', 'j');
        replace(_password.begin(), _password.end(), 'à', 'k');
        replace(_password.begin(), _password.end(), '', 'l');
        replace(_password.begin(), _password.end(), 'ø', 'm');
        replace(_password.begin(), _password.end(), '', 'n');
        replace(_password.begin(), _password.end(), '', 'o');
        replace(_password.begin(), _password.end(), '½', 'p');
        replace(_password.begin(), _password.end(), 'œ', 'q');
        replace(_password.begin(), _password.end(), '', 'r');
        replace(_password.begin(), _password.end(), 'Ã', 's');
        replace(_password.begin(), _password.end(), '£', 't');
        replace(_password.begin(), _password.end(), '`', 'u');
        replace(_password.begin(), _password.end(), '~', 'v');
        replace(_password.begin(), _password.end(), '', 'w');
        replace(_password.begin(), _password.end(), '¤', 'x');
        replace(_password.begin(), _password.end(), 'ð', 'y');
        replace(_password.begin(), _password.end(), '', 'z');
        replace(_password.begin(), _password.end(), '', ' ');

}



int encrypt(string _password){

        replace(_password.begin(), _password.end(), 'a', '•');
        replace(_password.begin(), _password.end(), 'b', 'µ');
        replace(_password.begin(), _password.end(), 'c', '');
        replace(_password.begin(), _password.end(), 'd', 'ü');
        replace(_password.begin(), _password.end(), 'e', '‰');
        replace(_password.begin(), _password.end(), 'f', '¢');
        replace(_password.begin(), _password.end(), 'g', '¼');
        replace(_password.begin(), _password.end(), 'h', '');
        replace(_password.begin(), _password.end(), 'i', 'Ž');
        replace(_password.begin(), _password.end(), 'j', 'Û');
        replace(_password.begin(), _password.end(), 'k', 'à');
        replace(_password.begin(), _password.end(), 'l', '');
        replace(_password.begin(), _password.end(), 'm', 'ø');
        replace(_password.begin(), _password.end(), 'n', '');
        replace(_password.begin(), _password.end(), 'o', '');
        replace(_password.begin(), _password.end(), 'p', '½');
        replace(_password.begin(), _password.end(), 'q', 'œ');
        replace(_password.begin(), _password.end(), 'r', '');
        replace(_password.begin(), _password.end(), 's', 'Ã');
        replace(_password.begin(), _password.end(), 't', '£');
        replace(_password.begin(), _password.end(), 'u', '`');
        replace(_password.begin(), _password.end(), 'v', '~');
        replace(_password.begin(), _password.end(), 'w', '');
        replace(_password.begin(), _password.end(), 'x', '¤');
        replace(_password.begin(), _password.end(), 'y', 'ð');
        replace(_password.begin(), _password.end(), 'z', '');
        replace(_password.begin(), _password.end(), ' ', '');

}
does anyone know what the error on line 29 is?
Your compiler does not show error text or what?

You do not have variable _password in main.
Topic archived. No new replies allowed.