klimi
Which software?
I would tell you if my internet was working... but i think it was called something like fritzer
chakiwinja
lmao
Anonymous
I would tell you if my internet was working... but i think it was called something like fritzer
This is the one that Klimi is referring to: https://fritzing.org/
Chat Boss
Ahmed sent a code, it has been re-uploaded as a file
Ahmed
Ahmed sent a code, it has been re-uploaded as a file
why the variable Member is not working?
Ahmed
What just happened? How it wasn't appeared and then it appeared
Ahmed
Weird
Anonymous
Now it appeared
Urggh. Use camelcase/snake case for variable names. You are not reading into the the name member of the Family members sub object as in AhmedHouse.Member.Name And I presume you would need to use a vector to host the family members. Right now, you can store only one family member's name , age and mobile number.
Athanas
why the variable Member is not working?
https://pastebin.com/FptT0PNL
Anonymous
I would tell you if my internet was working... but i think it was called something like fritzer
Is there anybody who knows how to set multiples window and rendering in imgui with SDL as backend rendering ?
Anonymous
I have a map and I want to erase some elements from it. May I do it while iterating in cycle?
Anonymous
I have a map and I want to erase some elements from it. May I do it while iterating in cycle?
Yes you can, provided you don't use an invalidated iterator in the process.
Anatolii
Hi guys! Is there someone who can explain me one thing. This program https://hastebin.com/icegeyageq.cpp swaps two strings inside array of strings, but why do I need to pas an address of each element to swap_strings function, aren't they just strings? Why that function takes two argument which are arrays of char pointers, meanwhile I pass the addresses of two usual strings. I'm totally confused. Thank you!
Anatolii
There is no such thing as "string" in c, its just array of chars ended by null, therefore if you want to swap members you need to swap pointers to the first letter
I know that there is no strings in C, but in that program I pass 2 elements of the same array of char pointers to swap_functions, but is takes them as 2 different arrays of char pointers, that's why I'm so confused. Thank you!
\Device\NUL
On C++11, you will get warn if you declare it without const
\Device\NUL
That's why you get RTE
Anatolii
That's why you get RTE
sorry, what is RTE? I'm a rookie
Anatolii
Run Time Error
but I don't get it, it compiles correctly
\Device\NUL
but I don't get it, it compiles correctly
That's why it's called RTE and not CE Compile Error
\Device\NUL
but I don't get it, it compiles correctly
specifically swap each members one by one
Anatolii
You need to iterate the string, on by one
but why then the swap function takes **char not just *char, if I just need to swap the address of the first elements of the strings? Thank you!
\Device\NUL
Consider this code char* p; I want to change the p value inside function It would become (char**) &p. Same as char ch I want to change the ch value inside function I would pass (char *) &ch
\Device\NUL
I actually use type *ptr coding style, but this is one is exception for explaining
Anonymous
hi guys! I have a problem I’m executing this code on QtCreator .... for(int i=0; i < nums.size();i++){ cin>>nums. at(i); } ..... and return this warning : “comparison between signed and unsingned integer expressions” but when I excute on Dev C++ it’s not return this warning and run On QtCreator the program do not execute Why?
Athanas
#include "std_facilities.h" int main() { int numbers[]{23, 45, 76, 66}; int i{0}; while (numbers[i]) { cout << numbers[i++] << endl; } return 0; }
Athanas
23 45 76 66 [Program finished]
Athanas
But when main(int argc, char* argv[]) I get different output
Athanas
23 45 76 66 -1091825580 1 [Program finished]
Athanas
Why it happened that way👆
Suka
Why it happened that way👆
its not related to main param but your method is ub. numbers[4] not always equals 0. except when you use string last index is /0 by default. you need to pass 0 to your last index of numbers. cmiiw
Chat Boss
#include "std_facilities.h" int main() { int numbers[]{23, 45, 76, 66}; int i{0}; while (numbers[i]) { cout << numbers[i++] << endl; } return 0; }
Ammar Faizi sent a huge message, it has been re-uploaded as a file This is an out-of-bound read, it's undefined behavior. numbers only has 4 elements, that means ..
Ammar
Plus, it makes people hard to read the message. What is the point of converting a message to a file?
Ammar
Ammar Faizi sent a huge message, it has been re-uploaded as a file This is an out-of-bound read, it's undefined behavior. numbers only has 4 elements, that means ..
That's just a couple of small paragraphs. This bot is stupid pointless and worthless. It's actively detrimental and not good for discussion.
klimi
Plus, it makes people hard to read the message. What is the point of converting a message to a file?
to get working code without pasting i guess. and not to spam walls of code. With inline code it's more problematic
Otoniel
That's just a couple of small paragraphs. This bot is stupid pointless and worthless. It's actively detrimental and not good for discussion.
Did you read this?: " 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. "
Ammar
to get working code without pasting i guess. and not to spam walls of code. With inline code it's more problematic
I suggest making a manual judgment on that. The bot can't measure which message is actually a wall of code. I think using a bot to do such a conversion does make sense, but again, it needs a manual review.
Ammar
Did you read this?: " 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. "
What are you talking about? > • Try to use markdown formatting. I would be surprised if I didn't. I did it very well. I even spare time to re-read what I've sent and edit any mistake I realize. > For many lines (10+) of code, use a pasting service [...] That's not a many lines of code. > Don't attach photos or videos [...] I didn't. And this group naturally restricts such an action.
klimi
I suggest making a manual judgment on that. The bot can't measure which message is actually a wall of code. I think using a bot to do such a conversion does make sense, but again, it needs a manual review.
and who will do such manual judgments? I believe that it should be possible to make such bot that would make good decision but once again, who would do such thing?...
klimi
Admins exist to do that. Community is not run by a bot, but real humans.
Yeah, but if that bot just deals with code, it doesn't mean that the whole community is run by bots. imo this community is run/driven by people asking their assigment, which is not optimal also. But having people be here 24/7 and dealing with these code walls just feels like huge waste of time if you have bot to deal with it
Ammar
Yeah, but if that bot just deals with code, it doesn't mean that the whole community is run by bots. imo this community is run/driven by people asking their assigment, which is not optimal also. But having people be here 24/7 and dealing with these code walls just feels like huge waste of time if you have bot to deal with it
Sometimes shit happens, and you try to minimize it. You're not expected to handle everything 24/7. I couldn't agree more. And surely converting a wall of code into a file should not be hard. But if expressing that rule results in a detrimental judgment, I would suggest that something is very wrong with the bot architecture and shouldn't be implemented at all.
Ammar
Yeah, but if that bot just deals with code, it doesn't mean that the whole community is run by bots. imo this community is run/driven by people asking their assigment, which is not optimal also. But having people be here 24/7 and dealing with these code walls just feels like huge waste of time if you have bot to deal with it
My alternative suggestion to this: You create an admin command that you can use to reply to a message that you want to convert into a file. This is a manual judgment, but fair. It's like, how often do people send a wall of code?
Ammar
I myself am not involved in improving the bot, but as a bystander let me assure you that the folks do take the feedback seriously and actually have an interest in improving the experience of the members.
Ammar
but that is the same way as giving warning to the person for the code wall... it still requires admins attention
Much better than the wrong judgment, seriously. I don't think this kind of rule is good to be automated. "it still requires admins attention" is not a reasonable excuse for this matter.
Ammar
How often do people send a wall of code? People do /report and wait. That's an ideal procedure in our world. In a perfect world, we have a bot that handles such a rule with 90% accuracy, but that world is not the world we live in. Please consider stopping this rule automation.
Dima
We already have got the bot which is accurate enough, not talking about Rose Code as a file is our request because otherwise people would spam with short newbie snippets that not everybody wants to see
Dima
We will not remove this rule, what we can do is to change the minimum code snippet size so it will kept as it is in some scenarios
Dima
But I think it would be better to have code uploaded as a pastebin/hastebin link, not as a file
Ammar
We will not remove this rule, what we can do is to change the minimum code snippet size so it will kept as it is in some scenarios
I've spat my concerns on this, but admins are not going to remove it, so I gave up. But anyway, I still hope that the changes you make, make it better. Let's move on then, I'm done spending time with this topic. [ Back to the C/C++ discussion... ]
hsn
hello anybody knows to code vhdl ??
hsn
or verilog ??
Anonymous
anyone here got new wz2 srcs
Chat Boss
Dorith Ganja sent a huge message, it has been re-uploaded as a file { SetConsoleCP(1251); SetConsoleOutputCP(1251); cout << «Enter the first value: " << endl..
Null
Sir Jones please write some shorter message before posting that
Null
It's a code...
yes but it has a finance context, that was detected by anti spam filter
Sir Jones
yes but it has a finance context, that was detected by anti spam filter
Mind I share it to you privately, coz I don't know how i can shorten it..
Null
Mind I share it to you privately, coz I don't know how i can shorten it..
you can send it again, you have more trust of the bot now
Chat Boss
Sir Jones sent a code, it has been re-uploaded as a file
Richard Luo 🐱
What's the difference between binary_semaphore and counting_semaphore? I look into the std header. The least_max_value is only used in max() which doesn't really do anything. So they are just the same thing?!