Anunay
So you may never end up using C++
Dima
Then choose GoLang and Python
python .. (╯°□°)╯︵ ┻━┻
Anunay
I don't like it
Anunay
But good for what he is going to do
rinaigen
ty.
!deaB!ts
Which is the best Linux distro for coding / development ?
Vitaliy ◀️TriΔng3l▶️
WSL because you may have tools that look nice
Vitaliy ◀️TriΔng3l▶️
but seriously, possibly something Ubuntu/Debian-related because of lots of packages and lots of users who may help? though I think repos of other distros are pretty actively maintained as well
rinaigen
So, i have one question again. In 2 years, i'll have the thesis project, it is a some mobile game, i have to do it. Cuz of my choose depends on it.
rinaigen
I was browsing a lot of programmers profiles on github to search the best way, not to regret the time spent.
rinaigen
So, Java + Python will be better for it? I want it for the future.
rinaigen
To be ready.
Dima
So, Java + Python will be better for it? I want it for the future.
these two are meh. go for c++ or c# development. even Lua is better
Dima
Unreal Engine even allows you to make a game without writing a code.
Dima
Using Blueprints. But this is not related to C++ and is off topic
Dima
#ot
rinaigen
Okay, Thanks.
Anonymous
How can I get string from command ligne with using optstring
you don't. you get string from command line using argv
Anonymous
int main(int argc, char *argv[]) read from argv[0] to argv[argc - 1]
Anonymous
for more details see Jens Gustedt's book, it's free
PO
Ok thank you
Anonymous
why does c++ need ide but html/javascript doesnt this question is making me sleepless pls make me sleep
Manas
why does c++ need ide but html/javascript doesnt this question is making me sleepless pls make me sleep
Who said so? c++ needs a compiler which the IDE provides along with the user interface its totally optional. You can write a program in any text editor and compile it with a compiler
Anonymous
how can i compile it outside an ide?
Manas
Install a compiler for c++ install gcc
Manas
are you using linux?
Anonymous
yes im using linux
Anonymous
i hv gcc installed
Manas
do u have g++ its better when it comes to cpp
Anonymous
yes i hv that too installed i had codeblocks so both the compilers are installed for c and c++
Manas
save your program in a file lets say code.cpp
Anonymous
ye oke then
Manas
then open your terminal in the programs directory and use the following command g++ code.cpp -o code this will compile the code and generate an output file with name code then just do ./code
Manas
the -o flag is used to specify a name for the output file it is optional
Anonymous
oke thank you very much sir for this knwoledge
Manas
oke thank you very much sir for this knwoledge
Welcome buddy And please don't call me sir😅
Anonymous
hehe ☺️
Ajay
The size of a struct is always a multiple of the largest data type, what if there's an array inside it, let's say int arr[10], will the size still be the multiple of the the largest data-type?
Anonymous
Since unaligned memory access is slow the C compiler pads for you
Anonymous
How the compiler pads is up to it
Ajay
Isn't the padding done so that the member with largest data-type is accessed in optimal way?
Anonymous
Isn't the padding done so that the member with largest data-type is accessed in optimal way?
There are some CPUs that can't even tolerate unaligned memory access
Anonymous
It is all up to the compiler
Ajay
How the compiler pads is up to it
Is that only through the order in which we declare the data members inside the struct or there anything more to this?
Nils
Hi, what is a possible reason why std::hash returns back the value without any hashing?
Alex
hi. please provide the code and the output
Nils
hi. please provide the code and the output
In short: std::hash<std::bitset<sizeof(ulong)>> sHash; sHash(res);
Alex
I did not work with bitset, probably there is no reason to hash bitset, cause its already hash
Sky
Đỗ
On x86_64 it works fine but on aarch64 it doesn't...
Did u use the hash function from the standard STL library or of some other package such as boost asio
Đỗ
may be it need to recompile to get on well in aach64
Youssef
Consider a grid of 1000 x 1000 LEDs which Initially are turned OFF. In this problem, you are allowed to pick any array of [5 x 5] of squares of LEDs and toggle their states. After toggling the states of all [5 x 5] squares one after one, how many LED will be turned ON?
Anonymous
whats this error?
Anunay
whats this error?
What do you understand from reading it?
Anonymous
i did try to link two source files but that doesnt work :c
Anonymous
its not defined?
Anonymous
but on other source file it is
Anonymous
i did try linking that source file to my main file but that doesnt work
Anonymous
Anonymous
Anonymous
Anonymous
when i build all the files
Liam
whats this error?
reverse the order of my.cpp and use.cpp
Anonymous
Liam
hmmm
Liam
that's because foo has declaration but does not have definition.
Liam
define it in a source file should fix
Anonymous
but its defined in other file
Liam
where? I didn't see it.
Liam
this
there is no definition of foo in your use.cpp.