Error Handling | C Programming Tutorial

Error Handling | C Programming Tutorial

Portfolio Courses

2 года назад

13,831 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@sruthimajhi5610
@sruthimajhi5610 - 01.12.2023 18:21

Can we write this same program in a linux system

Ответить
@yigitcoban9823
@yigitcoban9823 - 13.03.2023 14:16

best sources of code. thank you portfolio courses and thank you Kevin browne.

Ответить
@johnnjoroge2228
@johnnjoroge2228 - 05.03.2023 14:51

Thanks, nice explanation

Ответить
@probexpd1916
@probexpd1916 - 08.01.2023 22:30

Great explanation - really turned the light on for me without overloading it with all the bells and whistles - thank you!

Ответить
@tails_the_god
@tails_the_god - 28.12.2022 11:24

What about like strerror_s?

Ответить
@mattichou
@mattichou - 05.09.2022 15:59

Thanks a lot ! I was trying to figure out how to do a log file for my programm and you answered almost all my questions !

Ответить
@milanstojiljkovic4802
@milanstojiljkovic4802 - 13.07.2022 18:04

Great explanation! Clear and concise, keep up the good work! ☺

Ответить
@ailijic
@ailijic - 11.07.2022 06:49

It's best practice to save errno right after the function call. Many of the functions called in the example also set errno. The function fopen is easy because the return value tells you that you have an error. In many functions the return value says you might have an error and you need to check errno, e.g. strtol. In these cases you want to set errno to zero before the call.

Ответить
@Everythingzof
@Everythingzof - 16.08.2021 09:37

How does errno know that what failed was file opening? I know you put "if (fh == NULL)" there, but how does it know that file opening failed and not something else? Who sets the errno value

Ответить