Defining Constants. Should I use CONST or #DEFINE?
Defining Constants. Should I use CONST or #DEFINE? // Just a quick video about constants. A lot of you have asked whether it's better to use preprocessor macros (#define) or const variables when defining your program constants. Both are acceptable, but they're not the same. This video breaks down some of the differences.
Welcome to my channel. I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
More about me and what I do:
https://www.jacobsorber.com
https://people.cs.clemson.edu/~jsorber/
http://persist.cs.clemson.edu/
To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [https://www.patreon.com/jacobsorber]
Source code is also available to Patreon supporters. --- [https://jsorber-youtube-source.herokuapp.com/]
Note: I haven't posted ALL of the code from ALL of my videos yet. The site contains code from my recent tutorials (I wasn't quite as organized in the pre-2019 past). I will add examples from older videos as I dig them up.
Видео Defining Constants. Should I use CONST or #DEFINE? канала Jacob Sorber
Welcome to my channel. I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
More about me and what I do:
https://www.jacobsorber.com
https://people.cs.clemson.edu/~jsorber/
http://persist.cs.clemson.edu/
To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [https://www.patreon.com/jacobsorber]
Source code is also available to Patreon supporters. --- [https://jsorber-youtube-source.herokuapp.com/]
Note: I haven't posted ALL of the code from ALL of my videos yet. The site contains code from my recent tutorials (I wasn't quite as organized in the pre-2019 past). I will add examples from older videos as I dig them up.
Видео Defining Constants. Should I use CONST or #DEFINE? канала Jacob Sorber
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Make your Data Type more Abstract with Opaque Types in C](https://i.ytimg.com/vi/TsUOhPsZk6k/default.jpg)
![Why do programmers use hexadecimal numbers?](https://i.ytimg.com/vi/dPxCGlW9lfM/default.jpg)
![Answering Your Questions (clang vs gcc, operators, and is web programming a waste of time?)](https://i.ytimg.com/vi/FPVTr4thm2M/default.jpg)
![Difference between macros and constants in C](https://i.ytimg.com/vi/TfJHlez7bek/default.jpg)
![](https://i.ytimg.com/vi/uov7EiXBpm0/default.jpg)
![Safety and Speed Issues with Threads. (pthreads, mutex, locks)](https://i.ytimg.com/vi/9axu8CUvOKY/default.jpg)
![Strings can get you hacked! (buffer overflows, strcpy, and gets)](https://i.ytimg.com/vi/7mKfWrNQcj0/default.jpg)
![What if I try to malloc WAY too much memory?](https://i.ytimg.com/vi/Fq9chEBQMFE/default.jpg)
![Setup Tips for Your Next Programming Project](https://i.ytimg.com/vi/LfIPVIsH4ZU/default.jpg)
![When do I use a union in C or C++, instead of a struct?](https://i.ytimg.com/vi/b9_0bqrm2G8/default.jpg)
![A Few Embedded Systems Tips for Beginners](https://i.ytimg.com/vi/j3SwYvuR8oc/default.jpg)
![Bit Fields in C. What are they, and how do I use them?](https://i.ytimg.com/vi/aMAM5vL7wTs/default.jpg)
![Incremental Programmers Finish First](https://i.ytimg.com/vi/kjHDnUjaai4/default.jpg)
![Header Issues: Guards, Name Mangling, and extern "C"](https://i.ytimg.com/vi/NeOTr0u7ALk/default.jpg)
![Can I Handle Exceptions with Try Catch in C? (setjmp, longjmp)](https://i.ytimg.com/vi/eQcRcgOnl9o/default.jpg)
![How to Implement a Stack in C (+ encapsulation)](https://i.ytimg.com/vi/A4sRhuGkRb0/default.jpg)
![How to Implement a Tree in C](https://i.ytimg.com/vi/UbhlOk7vjVY/default.jpg)
![Reviewing your Code: Refactoring](https://i.ytimg.com/vi/BM9cnSEY23s/default.jpg)
![Understanding and implementing a Linked List in C and Java](https://i.ytimg.com/vi/VOpjAHCee7c/default.jpg)
![The Call Stack and Stack Overflows (example in C)](https://i.ytimg.com/vi/jVzSBkbfdiw/default.jpg)