Ludovic 'Archivist'
It’s a waste of memory to allocate each chunk of memory to 46bytes though especially since most words are around 5 characters long, you could count the length of the word then allocate memory to fit the size of that word plus a null
That is also quite wasteful. It is simpler to actually copy the entire string and allocate an array of offsets, and add a null in the middle of the allocated string where the space was as you read it
Ludovic 'Archivist'
Memcpy is also more efficient at copying larges swathes like that
Ludovic 'Archivist'
That will avoid all inefficiencies related to allocating small amounts of memory
Spirit
Yeah
Spirit
Never thought of that
Ludovic 'Archivist'
You will, however, not be able to free the little strings, and will need to free the large one at once, so less memory efficient long term, but also causing less memory fragmentation
Ludovic 'Archivist'
Trade-offs yada yada
Spirit
Still smart way of looking at it
Ali
Hi Everyone, can anyone please share any bootcamp or a course for cpp ?
Money
Give me C notes
Billy ᛭
Give me C notes
How about we better gave you some v bucks?
Rose
Give me C notes
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
Anonymous
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
AmR
Any one try build ADB ?
Anakin
Any one try build ADB ?
what's that?
AmR
https://developer.android.com/tools/adb
Anakin
^
is this C(++) related?
AmR
It's C App Use C lib's
AmR
If Any one try build it then he can help me, that's all
AmR
If not then thanks :)
krishnan
Basics of c programming ?
Dharun
Guys does anyone have prepbytes interview preparation lecture videos??
Mak7chek
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Minakshi
I'm in my 1st year of btech Which language is best for faang prepration
Minakshi
Target to complete this in how much days...
Raj
Target to complete this in how much days...
It depends on you, for me it took 2 weeks, because I knew few languages before that like Kotlin and Python. Absolute Beginners take more time.
Minakshi
Follow the road map
Can I complete it with mysirg
Minakshi
Thq
Rose
User N 3 has 1/2 warnings; be careful! Reason: facebook ad
Maxim
/report
Rose
/report
Reported Kxzlq D’assaut [7459046310] to admins.​​​​​​​​​​
Kxzlq
/report
why report me?
Maxim
why report me?
read the rules
Kxzlq
dont need
Kxzlq
i dont have time
Roxifλsz 🇱🇹
????? What the fuck are you waffling about
Kxzlq
basically i have an apk file and i need a guy to script it to bypass anti viruses on android
Roxifλsz 🇱🇹
Not the right place to ask, plus you're likely trying to do something nasty
Kxzlq
what i do is none of your business
Roxifλsz 🇱🇹
what i do is none of your business
Install kali linux retard
Kxzlq
Install kali linux retard
I don't know how to do it, that's why I'm asking
\Device\NUL
Why should people help you if it's none of their business 🤔
Kxzlq
.
harmony5 🇺🇳 ⌤
Not the right place to ask, plus you're likely trying to do something nasty
Check their description, it's obvious they want something illegal
Roxifλsz 🇱🇹
i suck illegal
/ban suck dick
Rose
/ban suck dick
Another one bites the dust...! Banned Kxzlq. Reason: suck dick
harmony5 🇺🇳 ⌤
They probably do that, too
harmony5 🇺🇳 ⌤
They were promoting some kind of OF-like site on their group
itsmanjeet
Hey, any body here started using c++20 modules ? On Linux with either gcc or clang I followed a lot of blogs on the same but unable to make it work
itsmanjeet
Same guide work for msvc not for gcc or clang
Ananth
gcc/clang has limited support for modules.
Ananth
gcc has slightly more features than clang. you can check the cpp comparison chart
Ananth
I have tried a few basic examples and got them working. it is still very much work in progress.
Ananth
I dont use windows or msvc, so cant compare.
Rose
User Software has 1/2 warnings; be careful! Reason: Whatsapp ad
🏳️‍🌈GNU/Линуксяша-libre🏳️‍🌈
https://godbolt.org/z/e6s6vnn7E How to make the compiler expand the recursion into a loop?
itsmanjeet
What error? Did you use -std=c++20 flag?
I tried with cmake as per the add_library(mylib) target_sources(mylib PUBLIC FILE_SET CXX_MODULES FILES file1.cppm file2.cppm) add_executable(myexec main.cpp) target_link_libraries(myexec PRIVATE mylib)
itsmanjeet
What's your GCC or Clang version?
GCC 14.1.0 Clang 18.1.7 Cmake 3.30.2
Uma Mahesh
Hi
Uma Mahesh
Hello
Uma Mahesh
Include iso stream using namespace std
Lucky
I want to make screen break project in c++ which things I need to know for this
Tronald
Qyu=*createQueue(Qyu_size+1); so this function would malloc a structure Qyu if(enqueue(&Qyu, element)) printf("Enqueue Successful\n"); so if I pass addresses to the function within an if statements, will the changes made by the function persist? in C
harmony5 🇺🇳 ⌤
Sorry, I don't know how to answer that