Pavel
Why he use stb_lib_facilities instead iostream?
There's a question in SO about that where people explain it a bit. But basically the author made that header file where he included <iostream> 🤷‍♂ https://stackoverflow.com/questions/45877104/is-c-std-lib-facilities-h-still-used
Pavel
Seems like he did that to make the code snippets use less space in the book but still be compilable. It is something that one shouldn't do normally. As well as using using namespace std; that people mentioned in the SO thread (that a lot of people who write books use to reduce snippets size, but nobody uses that in real code)
Eric Czeladka 🇫🇷
/get
Rose
/get
Not enough arguments!
Eric Czeladka 🇫🇷
/get projects
Rose
/get projects
Please check the Resources section for links on Open Source Projects in C/C++ some of which are explained from scratch.
Eric Czeladka 🇫🇷
/get ot
Rose
/get ot
Offtopic discussions should be done in the C/C++ Offtopic group. Please take your discussion/questions there.
aaswq1
Maybe i asked it before, but i repeat Is prata's "C++ primer plus" bad book?
Pavel
Soooo...book learn you to bad code?
In this example, yes, it teaches a bad thing, though it's quite a small thing in the beginning
Rose
Purge complete.
mito
Go to offtopic chat if you want to roleplay or do anything else.
Rose
Offtopic discussions should be done in the C/C++ Offtopic group. Please take your discussion/questions there.
EmbRio
I wanna learn c++ but i don't have basic in programming what should i learn first.
EmbRio
/get ot
Rose
/get ot
Offtopic discussions should be done in the C/C++ Offtopic group. Please take your discussion/questions there.
EmbRio
I wanna learn c++
klimi
Hello i new in c++
then please read the rules and follow them
klimi
Go through all the rules and the links mentioned in this post. Contravening the rules laid out here will result in a warning (least likely) or a ban (most likely). This group is meant only for C/C++ discussion. For chitchat of any other kind, go to the Offtopic chat, where anything unrelated to C/C++ programming can be discussed subject to the rules laid out for that group. For information on learning C/C++, see our list of resources at @Resources RULES: 1. Only English language is allowed. If you don't speak English, then this group is not for you. Please look elsewhere. 2. This group is meant to be used for C/C++ discussions alone. Assembly language discussions are allowed as well. The moderators' intention is to keep this group clean and to stick to the purpose the group was created for. Hence, questions or discussions about anything else is strictly forbidden. This further means that: • You should not send useless messages like "Hi"/"Hello", "I'm new here" and similar. • You should not send useless messages like "Does anyone know XYZ?", "Has anyone used XYZ?". Just ask your question directly. • You should not ask questions without checking your problem in Google or any other search engine. Doing so will result in a warning. Following this, check the Resources section of this group to see if your question has an answer there. • You should not ask exams/homework/interviews solutions. This will get you banned. Asking for something that is there in the pinned message right after joining will get you banned. 3. NSFW content (porn, nudity etc) is not allowed. 4. Religion, politics and ideological topics are forbidden. 5. A little bit of programming related jokes and memes are allowed subject to admin group's discretion. 6. Advertisements of any kind are forbidden. Job postings will not be allowed either. If you are unsure about whether something could be construed as an advertisement, please check with one of the admins before posting the message. Not doing so will result in a ban. 7. Code sharing is encouraged subject to the following rules: • Try to use markdown formatting. • For many lines (10+) of code, use a pasting service like Gist, Pastebin, Ubuntu Paste, Hastebin. Don't post walls of code in the chat window. Firstly, it inconveniences others and secondly, you are unlikely to get a response and may even get warned or banned. • Don't attach photos or videos of your screen. Screenshot captures are ok. 8. No illegal activity. This also means no piracy, no requesting/offering hacking/no posting of compiled executables. This will result in an immediate ban. 9. Respect people's privacy. Don't send private messages to people in this group without taking their permission to do so. Not following this rule will result in an immediate ban. 10. Avoid usernames that affects chat readability. The group bot Rose offers a lot of readymade responses that can be used when replying to someone. The most commonly used ones are: • #paste - Display a list of sites where code can be shared. • #markdown - Learn how to use markdown formatting. • #res - Post the link to the C/C++ resource collection. • #meta - Tell someone to get to the point! • #howtoask - Tell someone how they should ask a question. • #ot - Tell someone that their question is off-topic and hence must be moved to the OT group.
here
Najmul
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Ибраги́м
https://www.youtube.com/watch?v=yPB_btV8epo
Danya🔥
https://www.youtube.com/watch?v=yPB_btV8epo
This feature has been out for quite a while, hasn't it?
Naikita
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Ибраги́м
This feature has been out for quite a while, hasn't it?
Yea, CTAD is 2017 and (class and string)NTTP is 2020 IIRC
Ибраги́м
https://www.youtube.com/watch?v=CIB_khrNPSU
Boss
Hello
klimi
Hello
nohello.com
Brooklyn
How do you use -O3 flag on terminal for c++
super
Can I convert python code to C++?
Sheokand
I've No Knowledge About C++ Language Please Help me 😭
super
I have forex trading signal generator written with python, Can I convert it to C++? So how long will it ake?
klimi
I have forex trading signal generator written with python, Can I convert it to C++? So how long will it ake?
it depends how much code it is, how good you are at programming in both languages and how much you care about the quality
Rose
I've No Knowledge About C++ Language Please Help me 😭
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
Rose
I've No Knowledge About C++ Language Please Help me 😭
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
Boss
Hello
hlebyshek
is anyone know idiom 'please'? I heard about it only once
/report
Rose
/report
Reported 𝕞𝕒𝕗𝕚 [355015713] to admins.​​​​​​​​​​​
Rose
User 来当股东 has 1/2 warnings; be careful! Reason: non english
Xerohero
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Rose
Purge complete.
Ya deway
Hello guys im working in a c++ code that use ndi for video capturing and Nvidia Tensor for image Object Recognition. I have some trouble comverting NDI data to SDL format (display video) the quality Is very bad
Rose
Reported to admins.​​​​​​​​​​​
Ludovic 'Archivist'
Hello guys im working in a c++ code that use ndi for video capturing and Nvidia Tensor for image Object Recognition. I have some trouble comverting NDI data to SDL format (display video) the quality Is very bad
What format does the camera output? Ndi is just a wrapper over some other format. Also SDL does not, as far as I know, have any reliable decoding capability so you can either rely on the GPU to do the decoding, you may want to use ffmpeg for this.
Rose
User Prashanth Kumar has 1/2 warnings; be careful! Reason: ai generated trash
Danial.
I want learn these areas of programming languages please 🙏order this list by less difficulty : 1-cloud computing 2-AI 3-backend or serverside programming 4-data science 5-IOT
Luca
Hi, I am developing an architecture for sending and receiving data packets. Specifically, I am creating a library that allows me to manage communication through multiple channels. Let's call Dispatcher the interface class for the in/out channel. I have created a DispatcherFactory which, based on certain rules, creates specific derivatives of Dispatcher. Each derivative is a separate module, for example: PDispatcher, FDispatcher, etc. By doing so, this library will have dependencies on all modules at compile and linking time. Is there a way in C++ to load these dependencies at runtime, so the library remains agnostic about how many and which derivatives exist at compile time? Thank you very much!
Ziky
I want learn these areas of programming languages please 🙏order this list by less difficulty : 1-cloud computing 2-AI 3-backend or serverside programming 4-data science 5-IOT
It depends on what exactly are you going to do. I have some insights into iot - you may simply get some soc from Nordic load their matter example and configure it to read thermometter and expose it to premade thread or zigbee stack - that is not hard. Developing and tuning IEEE 802.15.4 driver is on another level
harmony5 🇺🇳 ⌤
I want learn these areas of programming languages please 🙏order this list by less difficulty : 1-cloud computing 2-AI 3-backend or serverside programming 4-data science 5-IOT
No one knows them all at the same time, they're too broad, pick one. Also those are not "programming language" areas, but entire subareas of software engineering.
Rose
Purge complete.
Scary
hi
Ayush
Guys I have to ask one thing I usually code in visual studio for c++ But whenever I run my program many times My compiler says permission denied and error compiling and when I restart visual studio the code start working I don't what to do
Ayush
i have checked it but nothing works
Ayush
i always have to restart visual studio
Vaibhav
Hi
klimi
Hi
nohello.com
Sourav
Hello
klimi
Hello
nohello.com
Hi everyone.I have a question about strcat.
Ludovic 'Archivist'
Rose
Hi everyone.I have a question about strcat.
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
https://dpaste.org/v59Da In this code I thought it will throw stack error, but it runs without error.But when I change array size of got to 15, it throws stack error. My question is this: How 21 letter size string could settle into 16 size RAM.And if can, why 15 size RAM couldn't?
Danya🔥
https://dpaste.org/v59Da In this code I thought it will throw stack error, but it runs without error.But when I change array size of got to 15, it throws stack error. My question is this: How 21 letter size string could settle into 16 size RAM.And if can, why 15 size RAM couldn't?
In the given code, you have two character arrays and you are concatenating one string to another using strcat. Let's break down what is happening: char got[16] = "Kral \"iyidir\""; // declares an array of 16 characters and initializes it with the string "Kral "iyidir"" char kralis[] = "Heheheha"; // declares an array to hold the string "Heheheha" strcat(got, kralis); // concatenates the string in kralis to the end of got printf("%ld, %s", sizeof(got), got); // prints the size of the array got and its contents 1. Initialization and Concatenation: The array got is initialized with the string "Kral \"iyidir\"". This string is 13 characters long (Kral (5) + \"iyidir\" (8)) plus the null terminator (\0), making it 14 characters in total. When you use strcat(got, kralis), the string "Heheheha" (8 characters + 1 null terminator) is concatenated to the end of got. 2. Array Sizes: - got is declared as char got[16]. It has space for 16 characters, including the null terminator. - kralis is declared and initialized as char kralis[] = "Heheheha". It has space for 9 characters, including the null terminator. 3. Concatenation Result: After concatenation, got will contain "Kral "iyidir"Heheheha". This string is 14 (initial string) + 8 (kralis) = 22 characters long. However, because got was initially declared with a size of 16, it can only store up to 15 characters plus the null terminator. This results in buffer overflow and undefined behavior because you are writing beyond the allocated memory of got. The fact that it runs without an error when got is of size 16 is due to the specifics of how the memory is managed and used in your environment. It is not safe and will likely lead to a crash or other unpredictable behavior. 4. Why it crashes with size 15: When got is changed to char got[15], the buffer size is even smaller. It can only hold 14 characters plus the null terminator. Given that the initial string "Kral \"iyidir\"" is already 14 characters, any attempt to concatenate more characters will immediately overflow the buffer and result in a more likely and immediate crash. Key Points: - Buffer Size: Always ensure that the buffer you are writing to has enough space to accommodate the entire resulting string including the null terminator. - Undefined Behavior: Writing beyond the allocated memory leads to undefined behavior which can manifest differently depending on the environment and specifics of memory layout at runtime. - Safe Practices: Use functions like strncat to avoid buffer overflows and always check the buffer sizes. Corrected Code Example: To avoid such issues, you should allocate enough space or use safe string functions: char got[24] = "Kral \"iyidir\""; // 24 to safely include additional strings char kralis[] = "Heheheha"; strncat(got, kralis, sizeof(got) - strlen(got) - 1); // ensure not to exceed the buffer size printf("%ld, %s", sizeof(got), got); This ensures that got has enough space to hold the entire resulting string, and strncat ensures that the buffer is not overflowed.