Artur
Don’t just try to click everything in one file 😅
Artur
But I am still afraid that it won’t work, will reply in 30 min
Anonymous
I want that when loop run second time it check '1'
Artur
https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html
So yes the
—host=arm-linux-gnueabihf
—target=arm-linux-gnueabihf
And now the interesting part I was using
-build=arm-linux-gnueabihf
As I thoughts it’s made inside docker container but the actual build machine is x86_64-pc-linux-gnu
Amrith
Amrith
Artur
Great. Do post the result please
-I/root/gcc-11.2.0/libstdc++-v3/libsupc++  -O2 -g /root/gcc-11.2.0/libstdc++-v3/include/precompiled/stdc++.h -o arm-linux-gnueabihf/bits/stdc++.h.gch/O2g.gch
In file included from /root/build/arm-linux-gnueabihf/libstdc++-v3/include/bits/move.h:57,
                 from /root/build/arm-linux-gnueabihf/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /root/gcc-11.2.0/libstdc++-v3/libsupc++/exception:148,
                 from /root/build/arm-linux-gnueabihf/libstdc++-v3/include/ios:39,
                 from /root/build/arm-linux-gnueabihf/libstdc++-v3/include/istream:38,
                 from /root/build/arm-linux-gnueabihf/libstdc++-v3/include/sstream:38,
                 from /root/build/arm-linux-gnueabihf/libstdc++-v3/include/complex:45,
                 from /root/build/arm-linux-gnueabihf/libstdc++-v3/include/ccomplex:39,
                 from /root/gcc-11.2.0/libstdc++-v3/include/precompiled/stdc++.h:54:
/root/build/arm-linux-gnueabihf/libstdc++-v3/include/type_traits:971:25: error: there are no arguments to ‘__is_nothrow_constructible’ that depend on a template parameter, so a declaration of ‘__is_nothrow_constructible’ must be available [-fpermissive]
  971 |       = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
Artur
It doesn’t seem as a popular error...
I did manage to install the gcc 11.2 manually in the compiler while running it in interactive mode without errors. So I build a container with required tools then run it and then installed gcc.
Perhaps the only alternative is to install it every time manually and commit the changes to the container?
Artur
In the container*
SerFed
Hello everyone! In VS 22 I found some issue with arrays.
For example: if make array like int arr[4] = {1,2,3,4}; and after use element out of array like cout << int[10]; program show number like -82.... or 0 and I have no exceptions.
Its new c++ feature or I must enable some exceptions type?
Artur
You are simply lucky that it doesn’t crash
SerFed
I want that it will crash on this line
SerFed
Where I must enable it? I can't found solving
Dr
Dr
You did have written int[10], which should throw error,
But if it's arr[10] then it won't
SerFed
SerFed
Dr
It's returning memory content, which is just dump number
Dr
if your array was assigned from mem location 0, arr[10] will return content at location 10, which is just random for this case
SerFed
ok, thanks
Gilded
how to get random dates in c program
Anonymous
Guys, I can't decide what to put inside no return no arg, with return with arg etc data structure
\Device\NUL
Nomid Íkorni-Sciurus
(void)argc;
(void)argv;
guys what is the point of doing this at the end of main?
Nomid Íkorni-Sciurus
I found it in an example usage of a library but I'm confused.
\Device\NUL
Nomid Íkorni-Sciurus
Ludovic 'Archivist'
Nomid Íkorni-Sciurus
Ludovic 'Archivist'
just not naming the variable does the same
Nomid Íkorni-Sciurus
I see, makes sense.
Pavel
(void)argc;
(void)argv;
guys what is the point of doing this at the end of main?
It's done to avoid comiler warnings about unused arguments. Nowadays you can mark them with [[maybe_unused]] if they unused sometimes (e.g. depending on a macro definition).
Or yes, as Ludovic said, the best way is just not give them a name (you can comment the name like /* argumentName */ if you don't want to loose it).
Nomid Íkorni-Sciurus
I see I see.
Nomid Íkorni-Sciurus
Pavel
Pavel
Nomid Íkorni-Sciurus
actually I have a question for you
I'm looking for a fast, real time maths library
Nomid Íkorni-Sciurus
I need it for float signal processing, DSP in particular
Nomid Íkorni-Sciurus
I'm looking for it in Conan Center but searching on it is a bit weird (I can't find libraries even if they are present in the repo)
J
can you say more clear please 🥲😅
Are you using *nix? If yes, you can use time.h header in your C/C++ program. Typing man time.h gives you implementations of time.h.
Electro
Any idea about GSoC organizations that work on C/C++ ?
Roger
does any one know how to do the min_heap with
priority_queue<pair<pair<int,int>,int>> ; ?
Roger
I'm writting dijkstra wth O(M*Nlogn) timecomplexty
Roger
I have no idea how cmp write (greater)
Roger
when dijsktra request the priority_queue it will send something like this : pair<pair<int,int> , int>
the first (pair<int,int>) is where the point storage ,
the last (int) is the value of dijkstra ,
Roger
thanks , i solved it
Roger
auto cmp = [](pair<pair<int,int>,int> &left, pair<pair<int,int>,int> &right) { return left.second < right.second; };
priority_queue<pair<pair<int,int>,int>, vector<pair<pair<int,int>,int>>, decltype(cmp)> pq(cmp);
浩
Hello, I am trying to learn how to cross compile (target: macos, compile in linux) with clang. and I try: `clang++ main.cpp -std=c++17 -target x86_64-apple-darwin --verbose -fuse-ld=lld --sysroot ~/macosfs/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -stdlib=libc++
clang version 13.0.1`, but it says: paste-bin.xyz 44817
浩
lld says cannot found crt1.o, but when I try call lld manually without trying to link crt1.o, it works and create a runnable a.out.
浩
OK, I know what happended, just add an environment variable such as "MACOSX_DEPLOYMENT_TARGET=12.0.0" to specify the currect sdk version
Robert
👍
Artur
Interesting task
const char* pSomeVar = “Some var”;
MyFunctionX( other Params );
How would MyFunction implementation look like to be able to capture pSomeVar ?
Artur
Any ideas ?
Yumangi
someone who knows how to work with burp suite?
Leovan
klimi
Artur
Yumangi
I want someone to teach me how to use burp suite repeater and burp interset, I need to learn how to capture otp codes or security code... can someone help me with this? I don't mind paying..
klimi
Leovan
Artur
Yes it’s a task to get rid of macros
Artur
I was thinking about possibility inheriting from lambda making a functor or something
Artur
But maybe there are better ideas ?
klimi
You haven't posted any macro
klimi
You need to provide the whole context so people can understand your problem
Leovan
You pass const pointer to function, what problems
Artur
Okey if you need to fix it on 100000 places
Artur
Would you still try to pass it?
klimi
what fix?
klimi
Please provide the whole context. Passing pointer in C is pretty standard thing, I fail to grasp the problem you have with fixint it on 1[0]+ places
Artur
You don’t understand
Artur
#define TEST() std::cerr << pSomeVar ;
int main()
Static const char* pSomeVar = “...”;
TEST()