klimi
and if i want to create empty array
klimi
can i do that?
Mihail
klimi
ok
klimi
and how do i acess this beast?
klimi
std::cout << map[1][1] << '\n';
klimi
hm
Mihail
and how do i acess this beast?
by clicking on this magical button click me
klimi
just
klimi
like normal array
Mihail
seems like it
Dhiraj
/
klimi
ye
Dhiraj
klimi
im so bad at coding
Dhiraj
BinaryByter
im so bad at coding
/ban can't code
klimi
:(
klimi
and
Dhiraj
klimi
STOP IT
Dhiraj
Ok
klimi
if(map[i][j]==map[i-1][j] && map[i][j]==map[i][j+1] && map[i][j]==map[i][j-1] && map[i][j]==map[i+1][j]) { } I LOVE CODING
klimi
determine
klimi
if all values are equal
klimi
if they are
Mihail
are you writing minesweeper or something?
klimi
they will get marked as not rendered
Anonymous
im so bad at coding
take care of your math stuff and you'll be good coder tho, or it gonna make it easier for you to be
klimi
im doing it so wrong
klimi
hm i see
klimi
i need to test only dirs if the player is higher
klimi
then i need to test only top left and right
Anonymous
if all values are equal
by all, what you mean ? every single element in that array is equal to 1 value ?
klimi
all in X
klimi
in cross
klimi
4 directions
Anonymous
I'm human
Anonymous
guys can u tell me how to run macro code
Anonymous
like i can't find main method how the code are executed
Anonymous
The formal syntax of a macro is: #define name(dummy1[,dummy2][,...]) tstring
Anonymous
im doing it so wrong
don't feel bad about it , just do all what you are able to do and cheer up and probably your way isn't so wrong , I can't think in a better way of doing it ( if there are any )
Anonymous
got what you meant , but this pic made it complicated lol
klimi
its just a lot of work
Anonymous
its just a lot of work
try to get into the mindset where your curiosity drives you to do it it helps sometimes , it feels you like you achieved something after you finish it instead of the casual feeling like you have got rid off of something
Anonymous
True that's ei think too
klimi
Programing is awesome
klimi
IDK how to implement it
klimi
But
Avezy
https://www.youtube.com/watch?v=eGWM_dI5egQ
Avezy
*watches good cppcon talk* *reads comments* *wth only comments about a sticker*
olli
if you pass an array to a function and call getLength there you still will have the same "issue" also you should not assume an int has 4 bytes
Zack
find_package(zlib REQUIRED) find_package(Boost COMPONENTS filesystem system REQUIRED) find_package(openssl REQUIRED) find_package(sqlite3 REQUIRED) if i wrote these in CMakeList.txt,it will link to the .dylib automatically,but if i want to link the static .a lib,how to config in CMakeList.txt
Zack
but they found -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") -- Boost version: 1.67.0 -- Found the following Boost libraries: -- filesystem -- system -- Found OpenSSL: /usr/local/opt/openssl/lib/libssl.dylib (found version "1.0.2p") -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") -- Found sqlite3: /usr/lib/libsqlite3.dylib
Zack
they fond dylib files
Zack
and then i use these set(EXTRA_LIBS ${EXTRA_LIBS} ${ZLIB_LIBRARIES}) set(EXTRA_LIBS ${EXTRA_LIBS} ${Boost_LIBRARIES}) set(EXTRA_LIBS ${EXTRA_LIBS} ${OPENSSL_LIBRARIES}) set(EXTRA_LIBS ${EXTRA_LIBS} ${SQLITE3_LIBRARIES}) target_link_libraries(${PROJECT_NAME} ${EXTRA_LIBS}) so the app linked with dylib
olli
yes, because it is specified that way e.g. in FindOpenSSL You need to set OPENSSL_USE_STATIC_LIBS to true to find and use the static libraries https://cmake.org/cmake/help/latest/module/FindOpenSSL.html
Zack
so how about other libs, i need find all the option like “XXX_USE_STATIC_LIBS” and set them true ?
olli
w/o setting it to true -- Detecting CXX compile features - done -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2n") -- Configuring done -- Generating done w/ setting it to true -- Detecting CXX compile features - done -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.a (found version "1.0.2n") -- Configuring done -- Generating done
olli
so how about other libs, i need find all the option like “XXX_USE_STATIC_LIBS” and set them true ?
zlib does not offer such a flag, you could also try to use (at least one Linux) set (CMAKE_FIND_LIBRARY_SUFFIXES ".a") for static libs set (CMAKE_FIND_LIBRARY_SUFFIXES ".so") for shared libs
Zack
thx, i’ll try
Dexter
You should use an IDE with dark theme
WoW.... That was extremely helpful Now whenever i'll find any problem i 'll change my theme
Anonymous
Thanks
Anonymous
Hello
Mihail
Hi
Anonymous
Where are from ?
Mihail
Everywhere
klimi
Anonymous
Fuck
Stefan
https://dlang.org/blog/2017/08/23/d-as-a-better-c/
Stefan
this is dlang