Anonymous
I want to ask a question.
oogeek
I want to ask a question.
If you want to ask a question, ask it directly.
Anonymous
Admin please ahare the group link Id love to add some of my friends who want to learn C++
Anonymous
Share*
Anonymous
Admin please ahare the group link Id love to add some of my friends who want to learn C++
Uhmm..This is a public group , you can just copy the invite link..
Anonymous
Can anyone please help me with my C assignment😢
Anonymous
No.
😢😢😢
Arthur
What are the symptoms?
Pavel
What errors?
Arthur
Runtime error or the result is incorrect?
Pavel
First it says that you forgot ";" https://ideone.com/yD9MVY Then if we fix that it says that reverse is not defined https://ideone.com/AbuS2q You need to include <algorithm> Also it says that ifstream is incomplete, first result in google: https://stackoverflow.com/questions/9816900/infile-incomplete-type-error After fixing that it compiles https://ideone.com/0bggl4
Anonymous
I'm through with that
Anonymous
Hello guys, I need help. Can we compile these source codes for windows?
Pavel
The next time try to check google for the errors. And for forgotten semicolons old compilers are not really helping with them, if you have a strange error that you don't understand sometimes it worth to look some lines above the first error you've getting.
Pavel
Hello guys, I need help. Can we compile these source codes for windows?
Here's your link (previously deleted by DaySandBox bot) https://github.com/saleemrashid/mediatek_flash_tool
Anonymous
please help me guys
Anonymous
What software I'm I going to download for c++
Anonymous
What software I'm I going to download for c++
Pavel
What software I'm I going to download for c++
No need to post it twice What OS you use? Windows/Mac/Linux?
Anonymous
Windows
Pavel
Windows
Try Visual Studio 2019 Community It may not be the best, but it has all the tools that you need and a lot of people using it, so you can find instructions "how to do your_thing in VS" pretty much for every problem
Lorenzo
who can make me the 2 completion program in C ++?
Lorenzo
I'm not good, I also need the explanations with // for using the commands
Lorenzo
thanks in advance
Anonymous
Me too
Lorenzo
Who can do it?
klimi
mayne people, but most of them won't bother c:
Lubega
Someone help me with this work please
Hariyana Grande
"unlike c, *&c is an rvalue." what does this mean?
Anonymous
who can make me the 2 completion program in C ++?
Just out of curiosity: what is the "2 completion" program. Never heard that term
Lorenzo
is the conversion from base 10 to base 2, but in reverse Ex: i have 20 from base 10, i have in base 2 the number: "10100" I don't know why, but it has to be reversed "00101"
Lorenzo
so who knows how to do it?
Anonymous
"unlike c, *&c is an rvalue." what does this mean?
Pretty much to simplify it: an rvalue stands on the right side of an assignment (and can not be used as lvalue) where a lvalue stands on the left and can be assigned to. At least thats what i remember from the top of my head. I think its better to look it up again
Anonymous
There was a little more to it. But i honestly would need to look it up again. But you can think of a rvalue as a value that can be assigned but can't be assigned to.
Hariyana Grande
ok that is enough to keep going thank you
Anonymous
Honestly let me look it up real quick ^^. Its a shame i dont remeber anything even tho i use C++ so often
Hariyana Grande
im reading it now will be back in minutes
Anonymous
Okay :)
Hariyana Grande
// declare a, b an object of type 'int' int a = 1, b; a + 1 = b; // Error, left expression is            // is not variable(a + 1)   // declare pointer variable 'p', and 'q' int *p, *q; // *p, *q are lvalue *p = 1; // valid l-value assignment // below is invalid - "p + 2" is not an l-value  // p + 2 = 18;  q = p + 5; // valid - "p + 5" is an r-value // Below is valid - dereferencing pointer // expression gives an l-value *(p + 2) = 18;  p = &b; 
Hariyana Grande
Okay :)
here it is in simple words
Anonymous
is the conversion from base 10 to base 2, but in reverse Ex: i have 20 from base 10, i have in base 2 the number: "10100" I don't know why, but it has to be reversed "00101"
I honestly wanted to give an answer or some hints but i think i still don't get what you are asking tbh. if you just have a c string like "10100" you can easily convert it into an integer with the atoi function. Reversing depends on how you have the number given. There are multiple simple ways to do it, if you think about it and performance wont matter too much im sure you can come up with something
Anonymous
here it is in simple words
Yeah, thanks 😅 so what i forgot about is that if you have a rvalue it is seen as temporary, meaning you can steal its data. This is useful to avoid deep copies.
Anonymous
Anyhow. Seems like i need to through some basics again 😅
t.me
Ok
Talula
😂😂 I feel you. It sucks
VB fan who can't program in real language? hmm...
Anonymous
Like a shallow copy only copies the pointer/address/reference. If you know you got assigned an rvalue you can "steal" its data and just copy the address. However, if you want to copy a lvalue that is not temporary you need to copy the data itself making it less performant especially for larger objects. This is a deep copy, where the result of the copy is not bound/related to the origin anymore. This especially becomes important when writing classes that support custom assignment operators. I didnt write one in a while so its worreing how much i forgot tbh.
Anonymous
I think one was able to the mov function for that, right?
Anonymous
Meaning for the "stealing" of data
Hariyana Grande
thanks i appreciate your help
Anonymous
A readup on a move constructor: https://www.geeksforgeeks.org/move-constructors-in-c-with-examples/
Hariyana Grande
you are awsome god bless u
Anonymous
Sure no worries^^ i wanted to look that up again myself so dont worry 😅
Hariyana Grande
i will look into it
Anonymous
Its basically an example of what i described. But not for assigment operators but for copy constructors. You have 2 versions 1 doing a deep copy in case you provide a lvalue i belive (the "real" copy constructor). And another one "stealing" the data from the other object in case ypu provided an rvalue. And thus avoiding the deep copy. (Also known as move constructor)
Hariyana Grande
got it i need to read some topics first some of these terms are new to me.
Ahadu
Python or C++
Ahadu
Python or C++
Which one is the good programming language
armandofsanchez
In this group c++
Ahadu
Anonymous
Ist like comparing any natural language. What is the better/"good" language: german or english?
Anonymous
obviously both have their use cases. Even tho. I don't really likr python too much i have to say it is quite useful for example for rapid exploit prototyping.
Anonymous
Prototyping in general and if performance isnt too important general automatization.
Anonymous
C++ is just a beast you can throw at anything and it will do at least okay
Nomid Íkorni-Sciurus
C++ is just a beast you can throw at anything and it will do at least okay
C++ is just very old and should be replaced. That's why is a beast that will do at most okay in 2021.
Anonymous
Not only okay it can do so much powerful things
Nomid Íkorni-Sciurus
Not only okay it can do so much powerful things
with 30% more code than any other actually modern language
Anonymous
Rust is also good lang
Nomid Íkorni-Sciurus
Don't get me wrong, I'm fine with C++ but it's not such a beast anymore.
Anonymous
Then which language is beast in your opinion
Nomid Íkorni-Sciurus
Rust is also good lang
I find it to be a bit complex I must say but it's okay.
Anonymous
Yah same
Nomid Íkorni-Sciurus
Anonymous
Can't say i agree. You have modern C++ and best practices. If you follow these you will end up with performant and maintainable code. C++ held its backwards compatibility wich has pros and cons. Its a pain for collaborative work tho... I think Rust has a place there because it enforces a coding style pretty much. In C++ you are free to do whatever