1,855 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
1
vote
11
replies
215
views
Is it safe to call fscanf after EOF?
I'm parsing a file, several fscanf attempts per line
Do I have to check for EOF in the returns after each one or can I do a big for-loop and check EOF in the skip-to-next-line routine?
cppreference ...
3
votes
1
answer
195
views
Can I specify eof as the delimiter in std::getline?
(From cppreference.com) getline is declared as:
template< class CharT, class Traits, class Allocator >
std::basic_istream<CharT, Traits>&
getline( std::basic_istream<CharT, ...
2
votes
2
answers
325
views
How to fix EOF error when parsing a request in Go?
I have an endpoint that should send an email and an image as multipart/form-data with the method PUT.
I always get the ParseMultipartForm error: multipart: NextPart: EOF when sending the data. It's ...
1
vote
1
answer
74
views
VS Code. File contents are not displayed in TERMINAL and OUTPUT
I'm using VSCode on Ubuntu 24.04.01.The screenshot shows a program that reads and displays the contents of a file. The "my_file.txt" contains the word "Hello". When I run the code ...
0
votes
2
answers
182
views
Why does reading a file with while ((c = getc(file)) != EOF) work on some platforms?
It is discussed in another thread that reading a file with the following code can result in an infinite loop because EOF is an integer outside the range of char and the while condition therefore ...
0
votes
0
answers
117
views
How to repair a file with java.io.EOFException
I'm not sure what happened when saving a file, but now when I try to load it I get java.io.EOFException. All of the code is in try/catch blocks but there was no error when saving the file.
Opening the ...
0
votes
1
answer
34
views
I get a premature EOF error from the w3c html validator and my Safari browser, yet the document is fine
The w3c validator.nu is giving me this bizarre error when I try to validate the document:
https:// ssh - test . me / booking
(remove all spaces before you copy-paste)
If you hit the ‘source’ option ...
0
votes
0
answers
450
views
Jenkins pipeline giving "unexpected EOF" error while doing docker push
I have a jenkins job where I am pushing the docker image in ECR. Please refer to the below code:
pipeline {
agent {
node {
label "${jenkins_node}"
}
}
...
1
vote
1
answer
115
views
Validating istream with std::ios_base::iostate
I have to write a stream extraction operator>> function which checks if the istream variable (stream) in the parameter is valid before returning it along with a delimiter (which is already ...
1
vote
0
answers
48
views
Why is EOF triggering on the last word instead of after trying to reget input?
So currently working on some exercises on I/O, my code basically takes a string from input and removes the vowels at input:
ExerciseClass.cpp:
NoVowelString& NoVowelString::operator>>(std::...
0
votes
0
answers
85
views
Determine which condition made an fstream not read a string?
Reading a std::string from a std::fstream with std::getline() or operator>> sets the same flags (fail and eof) in the following scenarios:
When the string is the last line of the stream.
When ...
DYZ's user avatar
- 57.3k
0
votes
0
answers
67
views
Fix PostScript file in Java (Missing %%EOF marker)
I have an Fortran application that can output PostScript files. When trying to read in the files using the ghost4j library, I get the following error
ERROR: %%EOF not found. File is not well-formed.
...
-1
votes
4
answers
157
views
How can I test C programs which require the EOF trigger in Bash on Linux?
Programming noob going through Kernighan and Ritchie's "The C Programming Language" for the first time. There are some exercises right at the start that require the use of EOF triggers.
I'm ...
0
votes
1
answer
218
views
C++ EOF Help Using Ctrl + Z and While Loop
I'm struggling a bit to understand how to set this up properly.
Just a bit of background. I'm new to programming and I've only been using C++ for 3 weeks now.
We were given a problem to allow a user ...
-1
votes
1
answer
90
views
Why is "input()" raising "unexpected EOF while parsing" error?
I'm coding in Python. I wrote this code in text editor:
input ()
Then saved as spam.py. In the terminal, it was successfully running by typing:
$ python3 spam.py
But when I ran the same code in ...