Anonymous
Post your code on Godbolt or wandbox
cant send link here, robot blocks
Anonymous
cant send link here, robot blocks
You can send links to Godbolt and wandbox. They are not blocked
Anonymous
Anonymous
can i send you my code so you post here?
Just post the link to wandbox or Godbolt. If it gets deleted by the bot, I can still recover it
Anonymous
You can send links to Godbolt and wandbox. They are not blocked
cuz wandbox and other one are both blocked here i must get a vpn first
🇺🇸
Hi everyone can someone helps me to solve the problem with SFML library and loading photo. Failed to load image "/Users/diyorbekmusayev/Desktop/University/HiSFML/2d.png ". Reason: Unable to open file
🇺🇸
You mean address of file?
Anonymous
Hi everyone can someone helps me to solve the problem with SFML library and loading photo. Failed to load image "/Users/diyorbekmusayev/Desktop/University/HiSFML/2d.png ". Reason: Unable to open file
Hi, It sounds like you are having difficulty loading an image into the SFML library. The first thing you should do is check that the path you have specified is correct. Make sure that you have spelled the path correctly, and that all of the file names and folders match up exactly. If the path is correct, then you may need to check the permissions for the file. Make sure that the user who is running the program has access to read from the file. If the path and permissions are correct but you are still having trouble, then you may need to check the format of the image. Make sure that it is a format supported by the SFML library. It is also possible that the image itself is corrupted in some way. You could try using a different image or converting the image to a different format and trying again. I hope this helps!
Chijioke
Hi everyone, pls, what is the difference between strupr() and toupper()? since both can make a string uppercase.
\Device\NUL
Hi everyone, pls, what is the difference between strupr() and toupper()? since both can make a string uppercase.
toupper is a function to make a char uppercase not string uppercase and it's a part from C ISO. strupr is non standard Microsoft-specific function
\Device\NUL
🙏Thanks
You can even create strupr function by yourself
dearfl
guys, can a function/template have different behaviours according to the noexcept attr of the calling site?🤣
Delious
Can u share c++ projects from basic to advance
Chat Boss
𝕱𝖗𝖔𝖟𝖊𝖓 sent a code, it has been re-uploaded as a file
𝕱𝖗𝖔𝖟𝖊𝖓
𝕱𝖗𝖔𝖟𝖊𝖓 sent a code, it has been re-uploaded as a file
I am not getting colored output Is this code right ?
\Device\NUL
How?
Learn about function in C/C++ and then come back to ask again how to do it.
IMPӨƧƬΣЯ
hello guys,i am a novice at cpp
IMPӨƧƬΣЯ
i am interested in how the memory adresses are associated to identifiers and the internal stuff behind c
IMPӨƧƬΣЯ
so can you suggest me some book which can give an introduction to how the internals work
Anonymous
so can you suggest me some book which can give an introduction to how the internals work
At assembly language level, the identifiers you use don't matter as all the instructions operate on memory directly. Labels do exist in assembly language but they are more of a convenience for hand written assembly code and are used to mark segments of code rather than individual values. From your question, I gather that you either want to understand how compilers/interpreters work or you want to understand assembly language. You can read a good book on it (there are many) but I would suggest learning more of C rather than going into compilers at this stage. Once you become comfortable with C programming, some of these concepts would self reveal themselves at which point learning either assembly or compilers would be an easier task.
布丁
i am interested in how the memory adresses are associated to identifiers and the internal stuff behind c
Memory addresses are not associated to identifiers. A variable can even occupy no memory at all. I would suggest not to study high level languages by reading low level semantics, which will later trap you into specific implementation details and prevents you from writing portable code.
IMPӨƧƬΣЯ
Thank you for the guidance tho
布丁
Precisely why i asked the question since i wanted to delve into the internals at some point.
When you say internals, we have compiler internals, x86 or arm or whatever machine internals, and language standards. They are different things. Assembly is not the internal of C language.
布丁
computer architecture essentially
Well, this topic is not related to C at all.
IMPӨƧƬΣЯ
Well, this topic is not related to C at all.
anyways pal thanks for yo time
IMPӨƧƬΣЯ
signing off
Chat Boss
Bobo sent a code, it has been re-uploaded as a file
Chat Boss
Bobo sent a code, it has been re-uploaded as a file
Bobo
Hello everyone, I'm new to C, I mostly write in higher-level languages, but still, I ran into a problem in the XOR function, when I go through a string and XOR results in 0x00, then the length of the string is simply cut off, I understand that this is the end-of-line character, but anyway, how can I solve this problem, here is the function code (*len input_str == len xor_str)
Chat Boss
♞♛♜ sent a code, it has been re-uploaded as a file
Bobo
I try to write without using libraries at all, but if some are used, I take them directly, then I just have stdlib disabled
Majid
♞♛♜ sent a code, it has been re-uploaded as a file
Hello, I'm going to face this problem. ‘__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >’ is not derived from ‘std::istreambuf_iterator<_CharT>’ vector<string>::iterator *it = find(mycolor.begin() , mycolor.end() , "red");
Bobo
Well, there is an input_str of 3000 characters, for example, if after 4 iterations, it will result in xor 0x00, then the length of the string becomes 4 and is not added further
Bobo
size_t sl(const char* str) { size_t len = 0; while (*str++) len++; return len; }
Bobo
How did you get the "length"?
I try not to use libs for the simple task of counting the length of a string
布丁
I try not to use libs for the simple task of counting the length of a string
There is no way for you to "count" the bytes. Just use whatever in the input.
Bobo
The problem is not with the length everything is ok, in the debugger everything is ok, the length is correct
Anatoliy Gridin
Hello everyone, please advise articles or videos about SAST?
Ehsan
size_t sl(const char* str) { size_t len = 0; while (*str++) len++; return len; }
Hi I have a suggestion for you, i hope it works Instead of searching like this in the while, search for null character '\0' .
Bobo
Fuck, I'm a fool, it's just a debugger, for output it translated into a string and output a short value, but the data was still stored there
Anonymous
I have encountered an issue. I have been studying mobile app development and artificial intelligence, but unfortunately my laptop has recently malfunctioned. I was hoping you might be able to assist me in resolving this problem. Thank you.
Ehsan
while (*str++) is basically while (*str++ != '\0')
Yeah both of them are the same, was just a suggestion, however i asked chatGPT and apparently the null character method is safer but i couldn't understand why😕 i kept asking gpt for an example that *str++ fails and crashes but it didn't generate any good example that would prove 🤷‍♂️
Danya🔥
I think they are bots...
Desmond
Ziky the red fox please dm me
Anonymous
If you get to the weird system where '\0' has different value that zero then while(*str) will not work. But I never hit that system nor heard of.
No. The standard says this: "A byte with all bits set to 0, called the null character, shall exist in the basic execution character set; it is used to terminate a character string." while(*str++) will work fine for null terminated strings and is preferred to the verbose alternative.
Anonymous
launch json errors . in vscode. help needed
P
coding community, i need help to solve a problem. i solved the problem all the given testcase are passed but when i submitted it is giving wa
P
link:https://atcoder.jp/contests/arc159/tasks/arc159_b
P
my code: ```cpp
Chat Boss
P sent a code, it has been re-uploaded as a file
dimazava
Hello, I'm passing local (not a class member) object using delegate pattern from A to B class, smth like (pseudocode) delegate.didChangeSmth(QBrush(a, b, c)); Should this "brush" parameter be wrapped with std::shared_ptr?
914
This is an English-only group right?
914
go check group rule
heaoven
But i don’t speak English.
M O H I T
heaoven
Pavel
Hello, I'm passing local (not a class member) object using delegate pattern from A to B class, smth like (pseudocode) delegate.didChangeSmth(QBrush(a, b, c)); Should this "brush" parameter be wrapped with std::shared_ptr?
It depends how didChangeSmt passes it, and how the function that is called stores it. Ideally you pass it by value, or by const ref or rvalue ref (basically, not by mutable ref), and don't store it by reference in the end, then you don't need shared_ptr
Ziky
I think in QT you can pass any (qt) object by value. Potential big data will be shared until you alter them
Aadi♠️
I m not advertising☹️
klimi
I m not advertising☹️
you are advertising a job when you will pay someone for program. that is advertising, is it not?
Aadi♠️
My 10k$ are stuck in my wallet and i am unable to find my private key☹️
Dima
sus