Alessandro
my friends and I were programming on replit when we needed to know how to make a program wait, someone to help me?
Alessandro
(Replit uses ubuntu)
Padfoot
Hi all, does anybody know of good linting tools for c++?
MicroNG
Hi
MicroNG
/get cppbookguide
Advisor.007✨
Done👌
🌫️
Hi everyone ! Can u help me about this question??
🌫️
Loner〽💻
/get ide
Anmol
Cland Tidy, Clang Format
Which options do you use on clang format?🙈
Francisco
Which options do you use on clang format?🙈
You should check the official documentation and craft your own .clang-format with your own likes and dislikes
Francisco
You can also take an existing one and modify it to your likes
Francisco
I started with the EASTL one
Anmol
I just added a few options over LLVM base
Francisco
What's this?
An STL implementation by EA. They have a .clang-format file in the source repository in GitHub
Sa
Guys , can we make a responsive sticker on Instagram?
Sa
I mean is it possible?
Maria33
How can I find the derivative of a polynomial in C? For example, I have f=2x^2 and I want f’. I want something like this void derivative(double f) { return ff //where ff is f’ } Does anyone know how to do it? Thanks
noop
How can I find the derivative of a polynomial in C? For example, I have f=2x^2 and I want f’. I want something like this void derivative(double f) { return ff //where ff is f’ } Does anyone know how to do it? Thanks
Maybe you can feed an array to the function with the size of the max order of the polynominal: f = [1 -2 3 5] -> x^3-2x^2+3x+5 then finding the derivative: ff = [3 -2*2 3]
noop
Maybe you can feed an array to the function with the size of the max order of the polynominal: f = [1 -2 3 5] -> x^3-2x^2+3x+5 then finding the derivative: ff = [3 -2*2 3]
Or you can also feed the size of the array to the function, so you will know the order; double* func(double *f, int o) o = order + 1
noop
Thanks, I corrected it
professor
what is an example of relative read in C/C++ code leading to an information leak using pointers or shared ptr ? (bypassing aslr stack)
Hussam
Do you mean like the following: ==== int t; cin >> t; while(t--){ int n; cin>>n; int a[n]; for(int i=0 ; i< n ; i++) { cin>>a[i]; } int cnt=0; while(n--) { int b; cin>>b; int ans=0; cnt++; bool flag=0; for(int i =0 ; i < cnt ;i++) { if(a[i] <= b) {ans = max(ans,a[i]) ;flag=1;} } if(flag) cout<<ans<<endl; else cout<<-1<<endl; } } ====
professor
this doesnt give output or leak , how so?
professor
why penetration testing groups if it's software security?
Hussam
Sorry, I read your message before it's been edited... But how to use binary search if the array is not sorted?
professor
good point, and recommend
Anonymous
What the hell
Yedi
https://gcc.godbolt.org/z/7Arcdi
Yedi
https://gcc.godbolt.org/z/7Arcdi
Yedi
where is the problem ?
Anonymous
Anonymous
The site is so poorly made almost impossible to type
Yedi
https://gcc.godbolt.org/z/7Arcdi
Anonymous
Anonymous
That site is not usable at all
Yedi
ok
Hermann
https://pastebin.com/ why this works only on my pc? i dont get stack error
Francisco
That site is not usable at all
Unless you're on mobile (where the site is not meant for), that site is the perfect one to share code. I prefer that one more than any other
Munashe
You gotta be kidding me why?
Anonymous
Just upload a text file?
Anonymous
Use github gist?
Francisco
But why
You can try tons of compilers, check if the code compiles correctly or not, check the asm, many languages to choose, execution of your program, etc
Francisco
There's no comparison, it's way better than anything out there
Munashe
Admin...
Munashe
Is the group admin online?
Dima
lol
Francisco
What stops you from running clang -S on local?
Nothing, it just makes my life harder
Munashe
/admin list
Dima
/admin list
what do you need?
Munashe
This popped up, don't know why...
Dima
you’ve post telegram link, it’s automatic
Dima
lol bruh.
Munashe
you’ve post telegram link, it’s automatic
Didn't post any telegram link I wanted to share this group's link with a friend...
Ork
Hermann
why -Wstack-protector -fstack-protector not find smashing stack?
Anonymous
why -Wstack-protector -fstack-protector not find smashing stack?
It will only find one if you seriously cross a stack boundary
Anonymous
Also you should probably use -fstack-protector-all
Anonymous
Or control the ssp-buffer-size
Hermann
write in C
Anonymous
Anonymous
Use the proper flag
Anonymous
Stack protector is defined in libc
Hermann
https://pastebin.com/We0rtSMB
here there is smashing stack
Anonymous
So how it behaves when an actual smash is detected is highly dependent on the library
Hermann
but gcc dont show it
Hermann
Use the proper flag
wrong flags -Wall -Wstack-protector -fstack-protector?
Bengar
hello
Hermann
what does mean stack protector not protecting local variables: variable length buffer in C?