Anonymous
Anonymous
what about IMPORTED targets?
Anonymous
target_link_libraries() supports those
Anonymous
how do you link a library target to a binary then?
Anonymous
i always did something like add_library(Bulk_quote STATIC something/bulk_quote.cpp something/bulk_quote.h) target_link_libraries(Bulk_quote PRIVATE Quote) target_include_directories(Bulk_quote PUBLIC something) add_executable(test test.cpp) # test.cpp uses bulk_quote.h target_link_libraries(test PUBLIC Bulk_quote)
Anonymous
what about IMPORTED targets?
https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/Exporting-and-Importing-Targets
Anonymous
:/ how would you link the target (that you created using add_library) to an executable?
Anonymous
add_library creates targets. you still need target_link_libraries() to link the target you created to other targets
MᏫᎻᎯᎷᎷᎬᎠ
GCC 10.1 Released https://gcc.gnu.org/pipermail/gcc/2020-May/232334.html https://redd.it/gf6ovp @r_cpp
MᏫᎻᎯᎷᎷᎬᎠ
🥳
MᏫᎻᎯᎷᎷᎬᎠ
An no Modules yet💔
Anonymous
ye and i asked them to read the documentation for both add_library() and target_link_libraries().
Anonymous
so i don't see the point you are making
Anonymous
i thought by sub project they just meant add_subdirectory()
Anonymous
and they weren't actually linking the files
Anonymous
oof. i never saw one. i think it was purged
Cool Guy
/notes
Cool Guy
/get googleit
Cool Guy
/get howtoprogram
Hermann
in the case of a union of structure, is it enough to initialize only the first element?
Cool Guy
/get learn
Hermann
https://gmplib.org/manual/Initializing-Integers.html
Nils
Hi, has anyone any idea why this function does not work: unsigned int strstartswith(const char *base, const char *str) { for (size_t it = 0; base[it] != 0; it++) { if (base[it] != str[it]) { return 0; } } return 1; } strstartswith("echo hi", "echo") Does return 1...
Hermann
it is a type
Hermann
so...can i init only field A?
Nils
AHHHH Thank you!
Hermann
with init A, is A_1 initialized?
Hermann
init(A) = A inizialized... so with init fields struct 1, is struct 2 automatically initialized?
Hermann
not well... i see onlt example like this a = { .flag = true, .value = 123, .stuff = 0.456 };
Anonymous
Hello guys What's the normal time for completing Harvard cs50 course ?
Hermann
yep...union share memory and only one member can given an initial value if you want inizialized a union
Nils
There is no "normal" time.
It complely depends on your level of knowlegde
Anonymous
There is no "normal" time.
I am a beginner and wish to complete this cs50 in 1 and a half month
Anonymous
Before my college starts
Nils
I am a beginner and wish to complete this cs50 in 1 and a half month
Take your time! If you are under pressure you pretty likely will stuggle more and reach less within that time.
Nils
What were your personal experience regarding the course.?
I have never did that course (I took my time to learn it all myself within 2-3 weeks) But it's always true; pressure won't help a lot. Specially while learning.
Nils
You need pauses too, if you just learn learn learn and never take rests you'll be less productive.
Anonymous
Will keep that in mind
Nils
Before my college starts
I'd recommend just starting, you'll see how far you get until your college starts. You'll have a lot of knowledge already even if you didn't do the complete course. Also you need time to experiment with your knowledge. Since that's where most of learning happens.
Hermann
for the clean method, freeing the memory, is it the same reasoning as the init method?
Hermann
Yep.. But struct 1 have 6 fileds and second struct have 7 fields... I call just six time free and my union is free... I using C
Hermann
I have initialized 6+7 elements..
noop
Can somebody explain why we see this message multiple times every day?
Anonymous
/notes
Anonymous
/notes
Anonymous
Thats why
noop
/get ide
Hermann
I have initialized 6+7 elements..
And than I clean 6 fields..
Anonymous
c in depth by srivatsava
Anonymous
c in depth by srivatsava
author understands that C order of evaluation is unspecified for most operators ✅ author seems to be confused about sequence points and the meanings of undefined behaviour, implementation-defined behaviour, and unspecified behaviour ❌
Anonymous
there are much better books to learn from
Anonymous
but at least this one doesn't go brrrrrr give output of x++ + x + ++x
Anonymous
(i just went to google books and opened up the chapter on operators)
Anonymous
Really?
i mean that horrible book is a pretty low bar
Hermann
Anonymous
What is an excellent book?
Modern C by Jens Gustedt is one, but for complete beginners i would recommend C Primer Plus by Stephen Prata
ZUKARI
Hey, I have homework c++ . Can anyone help me?
Anonymous
what is it about?
Shani
Hii everyone
Anonymous
hi
Shani
Does someone have c pointer good instruction? I have got homework on this subject...
AmR
Hello
AmR
Now I got My laptop back sorry for that
ZUKARI
What is the result of the following program part? B= 3; A=++B; İf (A==B) cout<<”1”, Else cout <<”0”;
Afoo_trader
Am having troubles with this am new to c and I have no clue if where to start
Afoo_trader
/admin
AmR
Any one free for helping me with cmake ?