Ludovic 'Archivist'
If you want to iterate over your list you can iterate over elements of std::map as well. But if you iterate more often than search/add/remove, then std::vector may be more efficient
The general idea should often be to use either vector or deque if you don't know what to use, and measure if performance comes into question. the number of times I see people using std::map to store less than 20 elements when std::vector with a linear search is order of magnitudes faster is mind boggling
Ludovic 'Archivist'
I should make a blog post on how much deque is overlooked and put some benchmarks comparing it to vector
Chat Boss
Ꭰɾ 𝑆𝑂𝐵𝐾𝐴 𝐾𝐸𝑈𝐷𝐸𝑈 ᴊᴏꜱᴜé sent a code, it has been re-uploaded as a file
Emanuele
Does anyone has a good link for Dijkstra algorithm for shortest h path in a double linked list?
01001000001001100101
https://www.programiz.com/dsa
01001000001001100101
https://www.programiz.com/dsa
See if u find something here
klimi
??
?????????????
Danya🔥
?????????????
??????????????????????????
Chat Boss
??
Hima sent a code, it has been re-uploaded as a file
Hima
Hima sent a code, it has been re-uploaded as a file
you can just write it yourself. The node class would look something like the code attached and while updating the path, make sure you make the right connections and your usual Dijkstra algorithm.
Houdaifa
I need to contribute to a beginner open source project, any one can help me ?
Arnold
you can do it
AlanCcE
It's allowed to make some questions about assembly here? The problem that I have it's not related with C/C++ already but it's probably involve it in some time
Yash
Anyone im a beginner so help me with this can we make UI / GUI in C++? or i need to learn another language for it?
Shaonianan
Hi,Guy ,I want to choose a network library. Hovering over the boost asio library with libcurl, Is there any better selection criteria?
Nitin
Hi
klimi
Hi
Read the pinned msg
Vaishali
@dev_ps04 Hope this helps!
Divyanshi
I have decided to build a plugin which can integrate with our gallery in the phone which will categorise images in which text is present Also one can search for a particular image with the help of this then
Divyanshi
They can write what is written in an image and then this can help find the necessary image
Divyanshi
Can anyone guide me for the same?
Chat Boss
Garry sent a code, it has been re-uploaded as a file
Chat Boss
Garry sent a code, it has been re-uploaded as a file
Mahdiy
I need to write GUI application for game engine editor. Which library should i use?
Yash
qt framework?
what is that sir?
Danya🔥
what is that sir?
Did google banned you?
Yash
nope and okay im going to Google dont be like that -_-
Think Like A Computer Scientist !
A general graphics class library
Yash
A general graphics class library
Hey computer scientist cuz of danya i search about Qt and im not clear on some things does Qt provide a open source library like math.h ,etc or we must download the Creator to use in windows cuz i dont got one :)
User
Hello everyone
User
Can i ask you for electronic engineer which programming languange should i learn
User
Or need for work
User
Any ideas please?
Arnold
You will need C if you ever do embedded
Yash
okaysirthankyousirsomuch
Can anyone explain pointers in simple words
Pavel
Can anyone explain pointers in simple words
https://i.redd.it/vljdvngdwuy71.jpg
Anupam2.7
int *p=&n; for (int i = 0; i < n; i++) { printf("%d ",*(&arr[0]+i)); } for (int i = 0; i < n; i++) { printf("%d ",*(&arr+i)); } isn't both method of print an array using pointers same? as both &arr and &arr[0] refers to starting address of the array. I am getting wrong output while using the second method.
Anupam2.7
The first way is correct i think
why not the second one? aren't they same thing?
Danya🔥
No, they are not
Danya🔥
&arr is either pointer to an array or to a pointer
Danya🔥
& is not needed
Anupam2.7
& is not needed
oh ya correct
Anupam2.7
sorry I meant to use array name directly without putting &
Anupam2.7
thanks everyone
Vinay
/start@MissRose_bot
Danya🔥
/blue_text_must_click
Vinay
Hi all. Can anyone please help me with any recorded videos or course on Pro*C? I checked all the major learning websites. Could not find any!PLease help
MHD
hi !
MHD
is it correct to use float with % ?
MHD
in c language
...
is it correct to use float with % ?
If you're talking about modulo, you're searching for fmod(), if you're talking about printf format strings you're thinking of "%f", if you're talking about fractions, depending on your use case it's probably fine to store fractions as floats
...
yeah ! but its incorrect
In that case, you're talking about modulo, use fmod() or fmodf()
MHD
In that case, you're talking about modulo, use fmod() or fmodf()
im beginner in c and i have to use simple things
...
MHD
https://linux.die.net/man/3/fmod
actually i have to work on this project ——-> reversing a float number ———> for example : 136.2 to 263.1
MHD
Are you sure you don't want 2.631?
yes but its not important .
...
yes but its not important .
Just use sprintf() to convert to a string, reverse it, use atof() to convert back