Rose
User Dukundimana has 1/2 warnings; be careful! Reason: nohello.com
Rose
User $cram! has 1/2 warnings; be careful! Reason: nohello.com
Rose
User CSCE COMPUTER EDUCATION has 1/2 warnings; be careful! Reason: nohello.com
Message Me
Hi
Akshat
Ok
B4H
Hey everyone ,Hope you doing well !! Do you know how to disable optimizations in my IDE (I'm currently using Microsoft visual studio c++ 2022). The code in the link is great example for what I want, So in short terms I'm testing the copy constructor calling process and If you run the code you'll see that It'd be called 4 times only , Howerver I believe it should be called 9/10 times In line 38 it would be called 3 times (passing object by value , returning object by value,assigning the result to result1 object ) In line 41 im not exactly sure but it should be either 6 or 7 times (For the same reasons above ) I hope that I've addressed my question properly and it's well understood , Sorry again for the long question :) Here is the link : https://godbolt.org/z/bY3r6f3Yc
Aisha
Thanks
Rose
You need to be an admin to do this.
Abbasi
In the absence of the move ctor and move assignment operator, their copy versions will mandatorily be used.
Abbasi
Your operator+ should also be like: class_3d class_3d::operator+(const class_3d& op1) // call to the overloaded operator { x += op1.x; // these statements y += op1.y; // overload the meaning z += op1.z; // of the addition operation return *this; }
B4H
Your operator+ should also be like: class_3d class_3d::operator+(const class_3d& op1) // call to the overloaded operator { x += op1.x; // these statements y += op1.y; // overload the meaning z += op1.z; // of the addition operation return *this; }
The code I gave was for learning purposes , My professor is givin it as learning material And when running the code on his IDE it gives like 9/10 "copy ctor" messages.
B4H
he said it could be optimization thing on my side or not latest version of MVC , but nothing seems to work
Prity
Hii everyone
Ludovic 'Archivist'
he said it could be optimization thing on my side or not latest version of MVC , but nothing seems to work
There is a bunch of copy elisions that are prevented by the printing of the statement
Ludovic 'Archivist'
They would violate the as-if rule
Ludovic 'Archivist'
(also, MSVC was born stupid, no need to hate on it)
klimi
Hi
/warn no hello
Rose
Hi
User Sweet Pie has 1/2 warnings; be careful! Reason: no hello
klimi
Hii everyone
/warn no hello
Rose
Hii everyone
That's 2/2 warnings; Prity is banned! Reasons: 1: nohello.com 2: no hello
B4H
(also, MSVC was born stupid, no need to hate on it)
he is using it :) , the purple one That's what driving me crazy
Jojo
Taking a detour by learning avr gcc and am shifting to c from asm, Now if I don't what to include the headers, that is input the code that the headers use, do I copy the .c or .h code to my .c code? Example of query In the use of delay function in linux, I use unistd.h which has a function delay, supposing I wanted my .c not to have a .h from unistd.h, do I copy the .h or .c of unistd?
Abbasi
The code I gave was for learning purposes , My professor is givin it as learning material And when running the code on his IDE it gives like 9/10 "copy ctor" messages.
Your copy ctor signature is not correct. It should be class_3d class_3d::operator+(const class_3d& op1) . That way you will see no copy ctor called in your code. With your current signature, the right hand side operand of + will be copied into the function's parameter raising the copy ctor member function.
Jojo
Dukundimana
Some one who try to build E_voting app??
Ziky
More of both...kind of refresher and advancing I didn't follow on not copying
standard libraries and its header files (like unistd.h) are somewhere in your system. You will not copy them anywhere. Compiler will find them in some standard paths our you may add additional include search paths using -I path/to/folder param and ten tell the linked to link it with another library using -lmycoollib
Rose
User S has 1/2 warnings; be careful! Reason: non english
UCHIHA 🦅
.
ABHI
What is Loop
Chirag
Can someone provide me C PYQs collection? Even if you have less questions please send them. I want to solve lot of questions for exam.
Never Spam Bot
UCHIHA 🦅 ITACHI 🥀 sent multiple messages that looks like a spam. To stop the bot from deleting your messages, write something non-suspicious. Or find out why here. Spam deleted in this group: 2538
ANONYMOUS
What is place holder and format specifiers
klimi
What is place holder and format specifiers
https://en.cppreference.com/w/cpp/utility/functional/placeholders https://en.cppreference.com/w/c/io/fprintf
Ziky
Oooh....their codes can't be reused as they are?
You want to use desktop libs on poor 8bit device ? :D
Chat Boss
ㅤJer sent a code, it has been re-uploaded as a file
Jer
Uh it "kinda" removed my message, can anyone else see that?
Jer
Btw i didn't copy and paste that code, I typed it out because it's on my pc lol and I'm on my phone, so it's indented correctly and if I made any spelling errors, it's spelled correctly in the actual code
Jer
Nevermind I made a typo in my code lmao
klimi
Uh it "kinda" removed my message, can anyone else see that?
Your code is above your message. It got re-uploaded as a file
Rajeev
Rajeev Kumar Thakur Age: 20 years Date of Birth: June 2, 2004 Main Rajeev Kumar Thakur hoon aur mujhe ek kaam ki zarurat hai. Mere paas sabhi schemes hain, aur main isliye apne liye naye opportunities dhoond raha hoon. Agar aap mujhe kisi kaam ke liye consider kar sakein, toh main bahut aabhari hoonga. Main apne kaam ko samajhdari aur mehnat se pura karunga.
Never Spam Bot
Puja . sent multiple messages that looks like a spam. To stop the bot from deleting your messages, write something non-suspicious. Or find out why here. Spam deleted in this group: 2543
Never Spam Bot
Akshat sent multiple messages that looks like a spam. To stop the bot from deleting your messages, write something non-suspicious. Or find out why here. Spam deleted in this group: 2545
Akshat
I have a question
Akshat
A great opportunity
Ludovic 'Archivist'
A great opportunity
/warn If you think your great opportunity is worth pinging almost 19000 people go away
Rose
A great opportunity
User Akshat has 1/2 warnings; be careful! Reason: If you think your great opportunity is worth pinging almost 19000 people go away
Jojo
You want to use desktop libs on poor 8bit device ? :D
😂😂😂not yet I first want to kind of have my own intrinsic libraries for the poor thing🙈🙈🙈
Vladimir
hello guys. is anybody familiar with the ninja build system?
Vladimir
i'm trying to understand why not my own code cannot be compiled
Chat Boss
ㅤVladimir Kononovich sent a huge message, it has been re-uploaded as a file
Vladimir
Okay I've fixed it, but in result clang++ adds mangling using additional __1 namespace, which breaks future loads of my .so
Simple Sorcerer
have it defined __sival_int. Can this be used? Or do you need to add a POSIX flag?
Simple Sorcerer
Or are there some functions in Linux to set the value ?
Simple Sorcerer
gcc 14.2.1
Puja
Hey add me
klimi
Hey add me
add you where?
Rose
User Sweetlife has 1/2 warnings; be careful! Reason: nohello.com
Rose
Hey add me
User Puja has 1/2 warnings; be careful! Reason: nohello.com
Simple Sorcerer
have it defined __sival_int. Can this be used? Or do you need to add a POSIX flag?
Emmmm. This is my error. I did not include <bits/types/sigval_t.h> But I did everything as specified in man7 But from man7 only those are defined there signal.h time.h
Jojo
umm maybe consider switching to arm. You will be able to debug.
Okay let me do a digging as for avr there is a book I used that had both c and asm and over where I am the arduino board comes easy plus has a bigger community 🤔🤔🤔not sure over here if I have heard of anyone using arm or I may be forced to get from parts as well as reference books and linux related tools for compiling and not why what
H
Doubt
H
How to start coding I have zero idea
H
Helpp
Ziky
How to start coding I have zero idea
first zou need to learn how to search the internet
H
Hehe I did but its confusing
H
Help
H
?
Hehe I did but its confusing
It is not good to start with C++ instantly, I first learned Python
Then C, C++ and more
H
Oh
But C is the most useful for your brain.It is kinda braindestroyer for your hard projects
H
Oh thx
Oh thx
You are welcome, choose one as first, Python or C But then you can learn other language I listed too.
GPU Governor
What do you guys think about the safe c++ proposal? Safecpp.org. Is it pointless, like just use rust instead
Ludovic 'Archivist'
What do you guys think about the safe c++ proposal? Safecpp.org. Is it pointless, like just use rust instead
It is good, but it will get refused due to the internal politics of the commitee