DDD – compilation fails: strclass.C: In function ‘std::istream& operator



DDD – compilation fails: strclass.C: In function ‘std::istream& operator>>(std::istream&, string&)’: error: ‘EOF’ was not declared in this scope


Error: 
strclass.C: In function ‘std::istream& operator>>(std::istream&, string&)’:
strclass.C:1546:35: error: ‘EOF’ was not declared in this scope



quote: “It turns out that the constant EOF was not probably declared by including stdio.h. So I went ahead and added that in:


To solve this: 

Edit strclass.C file around line 41 after the line #include <stdlib.h>
add line 42 #include <cstdio>

that should fix your compile problem. It did work for me.

Post a Comment

Previous Post Next Post