Home c++ Identifier not found

Identifier not found

Author

Date

Category

read in one book that if you need to do one action several times, you can create a “void”, in which to register this action and cause it as needed. I did it and when I try to compile me gives me a C3861 error: “Crypt: Identifier is not defined.” The code is not in it yet, it’s just a frame.

# include "stdafx.h"
#Include & lt; iostream & gt;
#Include & lt; iso646.h & gt;
#Include & lt; CString & GT;
#Include & lt; Cstdio & gt;
#Include & lt; stdio.h & gt;
#Include & lt; String & GT;
Using Namespace STD;
INT MAIN ()
{
SETLOCALE (LC_ALL, "RUS");
INT KEY, I, N, FUNC = 0;
Char Original [80];
char code;
COUT & LT; & LT; "What do you want to perform: encryption (1) or decryption (2):";
CIN & GT; & GT; FUNC;
if (Func == 1) {
  Crypt ();
}
ELSE If (Func == 2) {
}
ELSE.
  COUT & LT; & LT; "You chose an incorrect action." & lt; & lt; Endl;
SYSTEM ("PAUSE");
Return 0;
}
Void Crypt () {
COUT & LT; & LT; "Privet?";
}
Void Encrypt () {
}

voids are out of Main if that


Answer 1, Authority 100%

You need prototypes of functions to use:

using namespace STD;
void crypt ();
void encrypt ();
INT MAIN () {

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions