|
Mods please close if this is too spammy But I have a quantum organization library I can’t figure out how correctly use #ifdefs. when I compile the test code it recursively reads the headers The code is at https://github.com/unidef/quantum Feel free to openly mock my code, I will cry and tell my cat because my cat went to marine school and my cat is cool
|
# ? Aug 19, 2018 12:22 |
|
|
# ? Apr 25, 2024 10:27 |
|
lolololol a) use pragma once or include guards. b) i think more people will get the joke if you write this with javascript.
|
# ? Aug 19, 2018 18:52 |
|
Bruegels Fuckbooks posted:lolololol So ifdef a set of libraries, then #define the keyword from the ifdef when you need to use the libraries? Like code:
|
# ? Aug 20, 2018 15:56 |
|
unidef freeman posted:So ifdef a set of libraries, then #define the keyword from the ifdef when you need to use the libraries? Example include guard: code:
#pragma once works the same way. If you just put #pragma once at the top of the header file, the header will only be processed once. All you have to do is have the text on a line at the top #pragma once. I would just use the include guards tbh.
|
# ? Aug 20, 2018 16:14 |
|
Why is there a trash folder?
|
# ? Aug 20, 2018 23:52 |
|
Bruegels Fuckbooks posted:Example include guard: What are include guards? I figured out ifdefs and added #pragma and it fixed the infinite header lookup. but the main function (quantum.c) says it can’t find a typedef in type.h, the DOC type in lib/quantum.h
|
# ? Aug 21, 2018 01:36 |
|
MrMoo posted:Why is there a trash folder? It’s a place where you can see unused code by other developers, kind of like a cache It’s also a reference from the 1992 movie “Hackers”
|
# ? Aug 21, 2018 01:40 |
|
OP, I find it cute that you decided to commit the temp files, and a directory with old versions of temp files and a binary.
|
# ? Oct 22, 2018 17:35 |
|
|
# ? Apr 25, 2024 10:27 |
|
unidef freeman posted:It’s a place where you can see unused code by other developers, kind of like a cache 1995, ahctually
|
# ? Nov 26, 2018 22:21 |