Hack Forums
[C] ~What is EOF ? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] ~What is EOF ? (/showthread.php?tid=5922733)



~What is EOF ? - RealyWhite - Dec 25, 2018

Is the EOF is ~Z ?

thanks


RE: ~What is EOF ? - jammy47 - Dec 26, 2018

end of file? What exactly are you trying to acheive?


RE: ~What is EOF ? - Bacardi Cola Lime - Dec 27, 2018

I assume you are using windows OS. The way you input EOF is Ctrl-Z. Hitting enter will also determine where the EOF is for console input.
Can you elaborate more on what you need to know?


RE: ~What is EOF ? - F.A.S.T - Dec 27, 2018

I don't quite understand what your Question is, But EOF means End of File.
If you're learning File IO,
PHP Code

<?php 
ifstream file
("batman.superman");

if(
file) {
 
  // File Exists
} else if(file.eof()){
 
 // till the end of file
}
else {
 
  // File Does not exist
} 




RE: ~What is EOF ? - 0xDEAD10CC - Dec 27, 2018

(Dec 27, 2018 03:49 AM)F.A.S.T Wrote:  I don't quite understand what your Question is, But EOF means End of File.
If you're learning File IO,
PHP Code

<?php 
ifstream file
("batman.superman");

if(
file) {
 
  // File Exists
} else if(file.eof()){
 
 // till the end of file
}
else {
 
  // File Does not exist
} 



"// File Does not exist" That's not what the indication of the failbit flags mean here... That may be only one of the causes.


RE: ~What is EOF ? - F.A.S.T - Dec 27, 2018

(Dec 27, 2018 01:48 PM)0xDEAD10CC Wrote:  "// File Does not exist" That's not what the indication of the failbit flags mean here... That may be only one of the causes.


Stack Overflow dude.. bad tm dss :D


RE: ~What is EOF ? - 0xDEAD10CC - Dec 27, 2018

The bool operator on that std::basic_ios accessor does not mean "file not found", it just means that the goodbit isn't set, thus it is the same as:

Code
if (file.good()) ...


The badbit could also simply mean that the file could not be opened; it means an I/O error, which isn't directly a conclusion that the file does not exist.

And you do realize that there are people on SO that don't always post correct information?

Try to open csrss.exe using your method and see what the result is.


RE: ~What is EOF ? - SIM-3466371 - Dec 28, 2018

(Dec 25, 2018 11:33 PM)RealyWhite Wrote:  Is the EOF is ~Z ?

thanks


End of file


RE: ~What is EOF ? - Money- - Dec 28, 2018

End of file? When using a program to read a text file , after reading all the contents it will reach end of file? Well that's my knowledge , there might be more explainations about it.


RE: ~What is EOF ? - Mayuko - Jan 5, 2019

EOF is ~D, on Linux systems ~Z should suspend you process (you can get back to it using the fg command)