#Problem Programm in C
16 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
it's in the line while (file = readdir(stream));{
it's the C-L1 problem can someone can help me to fix that line please
try ```c
while ((file = readdir(stream)) != NULL)
and don't put the semicolon at the end
oh yeah you have a stray semicolon after the while statement
while (file = readdir(stream)) {
should work as intended
you could also add the != NULL that Luken suggested, but it works the same way as without (since NULL (0) breaks the loop already)
in that case it depends on how you want the code to read
This question is being automatically marked as stale.
If your question has been answered, type !solved.
If your question is not answered feel free to bump the post or re-ask.
Take a look at !howto ask for tips on improving your question.