Identifier not found,even though i have declared the function in header file,and made it in .cpp

Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int  hillcypher::ToChar(int x){...}

std::string EncriptFunc(int a[2][2], int b[2][1]){
int prv_broj, vtor_broj;
prv_broj=((a[0][0]*b[0][0])+(a[0][1]*b[1][0]))%26;
vtor_broj=((a[1][0]*b[0][0])+(a[1][1]*b[1][0]))%26;

char k;
char c;
k= ToChar (prv_broj);
c= ToChar(vtor_broj);
std::string RegString;
RegString+=k;
RegString+=c;
return RegString;
}


here it is declared in .h file
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

#ifndef HILLCYPHER_H
#define HILLCYPHER_H
#include <cstdlib>
#include <string>
class hillcypher
{
private:
    std::string keyword;
    std::string TextEncode;
    std::string RegString;
    std::string finalString;
    int ToNum(char x);
    int ToChar(int x);
    int gcd(int a, int b);
    int mod(int a, int b);
    int Determinant(int a[][2]);



public:
    hillcypher(std::string a, std::string b);
    void DecriptText();

    std::string EncriptFunc(int a[2][2], int b[2][1]);
    std::string FinalTextEncoded();

};

#endif // HILLCYPHER_H

i have no idea what the problem is
You have forgot to write hillcypher:: before the function name when you define EncriptFunc.
Topic archived. No new replies allowed.