I am receiving a "non-visible declaration" error on my Generator. I am converting this code from a single procedure to using multiple procedures and functions.
I have truncated the code a bit Any explanation of the non-visible declaration error would be appreciated. The non visible declaration error is occurring in this block of code:
WITH Ada.Integer_Text_IO;
USE Ada.Integer_Text_IO;
WITH Ada.Text_IO;
USE Ada.Text_IO;
WITH Ada.Strings;
USE Ada.Strings;
WITH Ada.Numerics.Discrete_Random;
PROCEDURE Project IS
SUBTYPE Guess IS Integer RANGE 1 .. 25;
G : Generator;
CorrectAnswer : Guess;
UserGuess : Guess;
BEGIN
Reset (G);
CorrectAnswer := Random(G);
FOR I IN 1..3 LOOP
GetUserGuess(UserGuess);
PrintCorrectAns(CorrectAnswer);
IF IsCorrect(UserGuess) THEN
Put("You Win!");
ELSE
Put("You Lose!");
END IF;
END LOOP;
End Project;