JY
Reverse(List *& list) in C++
Guillermo
where are channel in spanish in C/C++
https://t.me/programacioncycpp
Guillermo
[1]->[2]->[3]->NULL should be [3]->[2]->[1]->NULL
you can do something like: typedef struct node* link; struct node { Item item; link next; }; link reverse(link x) { link t, y = x, r = NULL; while(y!=NULL){ t = y->next; y->next = r; r = y; y = t; } return r; }
Guillermo
Look at Sedgewick (Algorithms in C - Parts 1- 4)
Guillermo
I have that book since 1999 and is the best for data structures in C at great scale :D
thelissimus
I have that book since 1999 and is the best for data structures in C at great scale :D
I was looking for exactly this kind of resource. Thank you.
Guillermo
Don't worry. If you get that book and study it every day you will get a great level in Algorithms and Data Structures used today in most fields (Systems, Game Engines, Embedded, AI, ...)
Guillermo
you have Cormen too (Introduction to Algorithms) but be aware the book is not focused to any language in particular. Any way, it worth the read.
Aayush
Hi
thelissimus
>no explanation >no context >no code What do you think?
Danya🔥
>no explanation >no context >no code What do you think?
No attempt to google "unresolved external symbol"
Danya🔥
https://stackoverflow.com/questions/9928238/unresolved-external-symbol-in-object-files
Danya🔥
Have you tried googling?
Danya🔥
Use available solutions to come up with your own
Danya🔥
How are you gonna solve problems at work that nobody solved before?
Danya🔥
No, you did not
Guillermo
I don't know if this question is offtopic or not, but I'll ask it anyway. If the question is Offtopic, don't hesitage to delete the question. Anyone has experience with Android NDK development? (I mean for C/C++ projects) I need to port a engine to Android and I have to admit I don't know where to begin. PD: I tried the guides (from developer.android.com) but no good luck!
Danya🔥
Lol the dude deleted his account because I warned him
Baby
just curious, whats pming
Baby
is it dm-ing?
Danya🔥
just curious, whats pming
"personal message"ing
Dima
/blue_text_must_click
GOPA
is it possible is i want to create a class but i want to decide the data memebers in runtime (like 2 int ,5char/ 3double ,3string ,5float)
Guillermo
yes (more or less) :D
Guillermo
I did something similar with maps some years ago. I did it with 'void *' pointers
Guillermo
You will need to create some kind of enumerator where you list data types. Because you will need to cast them between types. I did it for a GUI where I had to add data types in run time.
Guillermo
lol, when I did it there wasn't std::variant :D
Danya🔥
lol, when I did it there wasn't std::variant :D
There sure was some kind of the implementation of this like boost::variant
Guillermo
Probably, I don't know right now
Albatross
Hello! Would anyone be willing to share their experience with using vcpkg?
Pavel
Hello! Would anyone be willing to share their experience with using vcpkg?
My experience with vcpkg was that I was trying to get a library using it (it is the official way to get it), and it was downloading hundreds of megabytes and installing stuff for like 30 minutes for a relative small library. So I decided that I don't want to struggle like that every time I get it to a new computer and pushed the built binaries into git instead of making it part of my pipeline.
Guillermo
which library?
Guillermo
Do you want to make a Game Engine, right?
Guillermo
good luck ;)
Astha
Could anyone please tell If we try to store elements in array more than its size than will it give stack overflow error ?
Ziky
Could anyone please tell If we try to store elements in array more than its size than will it give stack overflow error ?
there is no check if you access elements beyond declared size you are reading or writing random memory
Ziky
I could imagine if you declare huge array as local variable then maybe you will get stack overflow on desktop
Astha
Okay thank you ...if try to access array elements more than its size than we get arrayindexoutofbound
Astha
But if we try to store more elements
Guillermo
how did you define the array?
Astha
Than maybe we get stackiverflow
Guillermo
if you define the array with std::array, maybe it throw an exception
Guillermo
if is a custom array like int array[10]; then, there is no exception thrown
Astha
Okay thank you
Ziky
BTW aren't you talking about C#?
Astha
No c only
Guillermo
In C, there is no exception. Maybe a segment fault when you try to write to a memory address forbiden (for example, if you try to write a value into the TEXT/CODE segment)
$$tandart
Hi everyone, i need to develop basic game using c++ gui. It may be qt or opengl. What do u recommend? Is there any resource tutorial?
$$tandart
and what game do you want to do?
Hide-and-seek game There will be 2 players that are located on opposite sides of the area. The vision of these players is limited so that they can see things near them. In the area, there are a number of ghosts that are randomly walking around the area. If one of the players is close enough to them, the player gets a point and the ghost will disappear. The game continues until all ghosts are seen by the players and the player that has the highest score wins the game.
Anonymous
It just rebuilds all your dependencies from source
Vcpkg needs something like wheel binary distributions that Python uses to reduce build time by downloading binary prebuilt packages for the target architecture. Pip and the likes also offer the flexibility of choosing a source build if you need one. Perhaps C++ community shouldn't stop with just copying format from Python and try borrowing ideas from package managers of other languages like Python, Rust etc
$$tandart
and you want to implement it in 2D? 3D? do you want to have good graphics or what are your technical requirements for the image?
You are free to choose any GUI library in your project. The game is required to be implemented in 2D graphics, however, if you implement it with 3D graphics with OpenGL libraries it will also be welcomed.
$$tandart
I prefer the one that has more resources and is easy. Also time limited
MAXWELL
Hi guys. Can someone help me on how to show asterisk when typing password. Program implementation in c++..
Guillermo
You can do that with the curses library. Or you can experiment with writing '\b' character to the console.
Sherlock
how can I install this version of c++. (Need to send a pic of command that is failing)
MAXWELL
what system?
Windows os..
𝓐𝓷𝓴𝓾𝓼𝓱𝓱
Yo
Chat Boss
Sajjad K sent a huge message, it has been re-uploaded as a file why this code dont work ? #include <iostream> #include <ranges> #include <algorithm> #include <..
Pavel
@lord_nobunaga_oda what "don't work" means? It doesn't compile? Or it procudes a wrong output? If it doesn't compile, what error you get? If it produces a wrong output, what output is expected and what output it gives?
Sajjad
@lord_nobunaga_oda what "don't work" means? It doesn't compile? Or it procudes a wrong output? If it doesn't compile, what error you get? If it produces a wrong output, what output is expected and what output it gives?
oh sorry it gives me error you know that if i just put the string_view inside the ranges::for_each this work without error if not it gives me substitution failed with g++ std=c++20
Sajjad
@lord_nobunaga_oda what "don't work" means? It doesn't compile? Or it procudes a wrong output? If it doesn't compile, what error you get? If it produces a wrong output, what output is expected and what output it gives?
i cant use pipe to put string_view operators inside for_each but i can just set it inside i wanna know is it because the std::ranges::for_each returns void i cant use composition or some thing else is wrong
Danya🔥
Also, views are lazy and even if your code compiled, nothing would be printed because you never iterate the "view", hence the lambda never gets called, so arguments container is empty
Danya🔥
The general advice is to study the topic before coding, there is a lot of talks on YouTube that can clear things up for you
Danya🔥
Like these: https://www.youtube.com/watch?v=sZy9XcGHmI4&pp=ygUMYysrMjAgcmFuZ2Vz https://www.youtube.com/watch?v=3MBtLeyJKg0
Sajjad
Like these: https://www.youtube.com/watch?v=sZy9XcGHmI4&pp=ygUMYysrMjAgcmFuZ2Vz https://www.youtube.com/watch?v=3MBtLeyJKg0
thank you so much i have watched some tutorials but try to learn by coding asap probably worst practice thanks for your time again
Danya🔥
The best practice is to watch/read some introductory content on the topic, then start practicing, then gradually increasing the complexity of practice feeding it with more advanced content
Danya🔥
Actually, the second link maybe too advanced for you now, please search for some content yourself if the first video is not enough. Make sure that found content is from some reputable source like CppCon conference or well-known C++ community figure.
Sajjad
The best practice is to watch/read some introductory content on the topic, then start practicing, then gradually increasing the complexity of practice feeding it with more advanced content
my personal method is to set a project (something like make a simple database) and try to use as many new things as i can some times i stuck in some topics to learn more about them