-3
void GenerateDecryptedData("/home/merve/merve.enc", "/home/merve/merve.dec","dEneMe!1234");

I want to call my function like dEneMe!1234.

void GenerateDecryptedData(const char* pathToEncryptedFile, 
                        const char* pathToDeccryptedFile,
                        std::string Pwd);

But when I wrote the function prototype like this, I'm taking string has not been declared- error! How can I take my password in string type?

NetVipeC
  • 4,402
  • 1
  • 17
  • 19
someWhereElse
  • 15
  • 2
  • 6

2 Answers2

1

You need the string header at the top of your source file: #include <string>. I'd consider Googling error messages more often. :)

string header - http://www.cplusplus.com/reference/string/
cstring header - http://www.cplusplus.com/reference/cstring/

xikkub
  • 1,641
  • 1
  • 16
  • 28
0

What's wrong with:

void GenerateDecryptedData(const char* pathToEncryptedFile, const char* pathToDeccryptedFile, const char* Pwd);
Gutblender
  • 1,340
  • 1
  • 12
  • 25