yd
Had anybody ever find the fopen could be quite slow in windows (gcc + mingw) ?
yd
I would like to do the profile and maybe write some test program later. But it will be really helpful if I know where to start.
Vlad
Or clang
yd
OK. Sounds like a good idea. Thanks.
yd
I actually tried the clang and it did not improve.
yd
I will try the MSVC then.
Vlad
Also why fopen is the bottleneck in your program?)
Vlad
It doesn't sound right
yd
The program reads 1500 small .wav audio file and processed them and write back to another directory.
yd
I worried that the fopen in gcc may not be as good as Microsoft’s own version.
Vlad
I worried that the fopen in gcc may not be as good as Microsoft’s own version.
I'm pretty sure it just calls whatever winapi implementation there is
Vlad
Maybe layout of FILE differs
Vlad
And that's where overhead comes from
Vlad
But it's just a guess
yd
Make sense.
𝙑𝙚𝙙𝙖𝙣𝙩
Hello, Any advise for C++ beginner? 😅 All i know about c++ is making algorithms for calculators,finding area and all that then I know basic OOP and inheritance. 🙂😅
𝙑𝙚𝙙𝙖𝙣𝙩
Now learn how to program through practice lmao
Yea I'm on it learning everyday trying some new algorithms too hope it will help 😂
Vlad
Yea I'm on it learning everyday trying some new algorithms too hope it will help 😂
When you won't feel overwhelmed write a pet project. Use libraries and such to create something relatively useful
Vlad
Rinse and repeat to the win basically
Vlad
While you're at it learn patterns and best practices along the way
𝙑𝙚𝙙𝙖𝙣𝙩
While you're at it learn patterns and best practices along the way
Ok mate thanks alot 😁 I'll give my best shot learning C++
Chandresh
concurrence_lock_error gettin this error whilw performing bubble sort in c++ ..vscode
Nisal
Is there anyone can solve algorithms
Nisal
Is there anyone can solve algorithms
in hacker rank cuz I have a question
Shvmtz
Is there any way to create an executable file(.exe) for c code in Linux so that the .exe file can be run on windows system too ??
klimi
Thank you :)
M.afshari
Hi, someone has this problem C:\Users\mahdi\Desktop\project\main.cpp> g++ m1.cpp C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain' collect2.exe: error: ld returned 1 exit status
M.afshari
Visual Studio code
M.afshari
I can not send the photo is a simple code
MRT
how i can increase the heap size for qt apps ؟
Pavel
how i can increase the heap size for qt apps ؟
Heap size? It depends on amount of RAM + swap available for the app on the target machine. You can either add more RAM or increase swap in your OS settings. Also if you're building x86 application, it's limited for something about 2 or 3 Gb of RAM (I don't remember which one), you may want to build it for x64.
Vlad
Although there are tricks to use upper part as well
Vlad
But it will give you like 3 gb of memory total
Vlad
Because devices are memory mapped
Pavel
But it will give you like 3 gb of memory total
Thanks, probably that's why I can't remember this :)
Abhishek
Define a time and add overtime display time+overtime anyone clue
Vlad
Gotcha covered
klimi
Vlad
And it's totally unrelated to the amount of heap
Vlad
ub ?
undefined behavior
Vlad
Feed it to the memory sanitizer I dunno
klimi
Thanks
Ammar
My system has 8 GB of RAM, most of the time when I use a new keyword for create pointer , when i use this pointer i get sigsegv segmentation fault ,sometimes work fine !
It means you treat them wrongly. I doubt it is because you ran out of memory, but let's see, if you provide more detail.
Ammar
Thanks
My pleasure.
MRT
undefined behavior
If I use the new keyword more than 3 times, I will face this problem
MRT
😂😂
MRT
i cant find fu... bug ! :(
Ammar
If I use the new keyword more than 3 times, I will face this problem
Just show your code, don't make nonsense sentence. It is not because using new keyword more than 3 times.
Anonymous
When learning about integers , I have seen this number, 2^32-1 What does it mean ? I have searched the internet , and it looks like it's the limit for the integers, Why the 2^32-1 ?
Vlad
Maybe you'd show us some code
Vlad
32 binary states = 2^32
Vlad
But you have to encode zero
Vlad
So maximum value shall be 2^32 - 1
Ammar
i try more than 10 different direction,But I get the same error again
Don't just say it doesn't work. Give exact error message, description and code.
Anonymous
32 binary states = 2^32
So , the limit is , 32 times 1, like 111111111..... For 32 times? If I convert it to decimal that's the limit?
Vlad
It would be 4 billion smth
Vlad
But it's not for an integer
Anonymous
This one , 2,147,483,647
Vlad
It's for an unsigned integer
Anonymous
This one , 2,147,483,647
Why and how is this the limit?
Vlad
This one , 2,147,483,647
One bit goes to the sign