Anonymous
🤷 i saw the signature as a list of items, idk what you mean by signature now <class member function> name, parameter-type-list (9.3.3.5), class of which the function is a member, cv-qualifiers (if any), ref-qualifier (if any), and trailing requires-clause (9.3) (if any)
Anonymous
no it's not. as an example, i already told you how the return type is not part of the signature for member functions and class member functions. the grammar has everything, but the signature is a list of specific things
Anonymous
you are still hand waving, please define the list of specific things that would constitute the signature of static member functions if "class member functions" does not mean "member functions"
Anonymous
Anonymous
member-declaration -> function-definition -> attributes declarator function_body etc etc
Anonymous
it does, but it defines so many other things
Anonymous
so what constitutes the signature
Anonymous
as an example, i already told you how the return type is not part of the signature for member functions and class member functions. the grammar has everything, but the signature is a list of specific things
Anonymous
that was what i said caused a contradiction, if i follow that "class member function" and "member function" are different, then there would be no list of things that i could call "these constitute the signature of a static member function"
Anonymous
if i say that they are the same, there is no contradiction anywhere
Anonymous
could you give a quote that says that 3.19 is the one that applies to static member functions and not 3.22
Anonymous
both of them are marked "if any" though
Ajay
I want to make vector a into an valid state where I can push elements into it, one way is to create a new empty vector<int> c and then assign a = c; which I think should later let me to push elements into a. Is there any other way to enable push_back operation on vector a again?
Anonymous
okay lemme read about this
Ajay
ok, thanx
Anonymous
yes i get your point now. if static member functions can be described through 3.19, then there is no contradiction
Sam
Hello, I’d like to know, how wrong Am I if I say structs in C is a kind of polymorphism? How far Am I from the concept? Thank you!
Anonymous
Can someone please answer this? https://www.quora.com/How-do-I-find-all-contiguous-subsequences-of-a-given-array-in-C
Anonymous
Is "Accelerated c++" outdated?
Anonymous
Use these books to learn C++, John
Anonymous
I am aware of that list... I was asking since "Accelerated c++" teaches c++98
Anonymous
I am aware of that list... I was asking since "Accelerated c++" teaches c++98
If this book is not in the list, it's most likely not worth to be read
Artöm
If this book is not in the list, it's most likely not worth to be read
I believe there're lots of book on specific topics which use C++ as code base and are not there
Artöm
The list consists of either widely popular or time-prooved books
Artöm
Although book with C++98 makes me question its outdatedness
Anonymous
lgat
https://www.freelancer.com/get/asmaoui3200
Francisco
Please, provide a minimal, verifiable and complete example, along with a detailed explanation of your problem. Also, if you want more people to help you, send the code written in English, which is the common language here
Francisco
Also, it's better to send the code through a link to a website like Compiler Explorer, pastebin, wandbox, etc, so we can copy & paste the code
Chaki
Hello, today I was trying to implement library in my project. My operation system is Windows 10. Before using windows I used to install package with cmake after that if there was no problem with dependencies it just worked.I suppose it builded library in include folder and when I wanted to use that library . But when I'm trying it on windows with cmake gui it's very different than linux. First I configurated that library then generate -> open project in VScode
Chaki
then clicked build All_build
Chaki
but it takes a lot of time to build it and I don't know what happening now :D it's just folder contains that files growing inside
Chaki
I'm sorry if it was stupid question to ask I'm new at C++
Dima
lol what a cringe
Ajay
Can I confirm this that when we write int a = 5; then actually 2 memory locations are allocated, one is temporarily for the constant literal 5 and other is for int a and then 5 is copied into a and then the memory location of this temporary is deallocated. So, instead if I write int &&a = 5; then we prevent the allocation of 5 and instead the temporary location now becomes permanent and gets the name a(variable name).
Ajay
Int?
Artöm
int&& x = 1; is bogus
Artöm
Int?
Any arithmetic literal
Artöm
int, float, char, bool
Ajay
int&& x = 1; is bogus
why? Ain't rvalue for this reason so that we can assign them literal constants?
Artöm
why? Ain't rvalue for this reason so that we can assign them literal constants?
Literal can be assigned to its type without any perfomance consideration
Artöm
rvalue locals are for heavy types
Artöm
And/or templated code
Ajay
But, then we can use them for simple types
Artöm
But, then we can use them for simple types
We can, what for? It helps neither speed nor memory nor readability
Ajay
We can, what for? It helps neither speed nor memory nor readability
So you mean there is no difference in the way the lvalues and rvalues get allocated and initialised. Right?
Ajay
and hence no difference in performance.
Alignant
Hello guys! :>
Ammar
#HelpMe #ASK #GCC #ZendEngine Hi, I have a problem with GCC Assembler This is my code: https://gist.github.com/ammarfaizi2/f7572bdb03976e22b95b29db074a1580#file-mycode-c-L50-L57 Expected behavior: 0. Fill register RDI with RSP value. 1. call *((void **)Z_STRVAL_P(map_addr)), the RDI will be used in this call. 2. Save the return value of the call to variable named ret. Current compile result: mov rdx, QWORD PTR [rax+0x18] ; Take *((void **)Z_STRVAL_P(map_addr)) lea rdi, [rsp] ; Fill register RDI with RSP value. call rdx ; call RDX mov rdx, rax ; (Unexpected Behavior) How can I save the return value (RAX) to variable named ret? Expected compile result: mov rdx, QWORD PTR [rax+0x18] ; Take *((void **)Z_STRVAL_P(map_addr)) lea rdi, [rsp] ; Fill register RDI with RSP value. call rdx ; call RDX mov [rbp - n], rax ; Assume rbp - n is the stack address where the variable named ret is stored.
Ammar
This is the current compile result.
Ammar
This is the current related code.
Bingus
Hi there, how do I calculate the sum of the multiple weights that the user inputs, to calculate my avg? Is it not sum = sum + weight?
klimi
Hi there, how do I calculate the sum of the multiple weights that the user inputs, to calculate my avg? Is it not sum = sum + weight?
i think you want to keep track of that weight output... maybe adding it to the sum variable or something...
Alignant
Able to elaborate more?
sum += weight =)
Alignant
Aaaand you are dividing by zero :D
Alignant
I wouldn't run it if I were you, it'll cause your processor to explode :D
Bingus
sum += weight =)
What does that mean? Sum += weight; I wanna divide by the final count and not the one I set as count. I don't know how to do that.
Sandro
Hi there, how do I calculate the sum of the multiple weights that the user inputs, to calculate my avg? Is it not sum = sum + weight?
The math of this routine is completely wrong, first of all of you declare sum variable without assignments you can't add value, because you don't know how is the value of sum, after this the average is the sum of all value divided by the numbers of value.... No evidences of this was showed in your routine....
Alignant
Also division by zero is bad
Alignant
DON'T EVER DO THAT
Anonymous
Oh god
Anonymous
I didn't notice that
Alignant
Also I'm not sure if it's legal to compare floats and doubles with operators
Ибраги́м
https://www.youtube.com/watch?v=PPAlh_FmO4M
Betty Ssam🍒
Hello
...
Hello and good morning. I want to ask for question no 2. Which one would be written first? For loop or the switch case first?
...
So, the for loop in the switch case?
frakw
what may cause this problem virtual funtion vptr become 0xcccccc
frakw
code here:https://github.com/frakw/ntust-oop-1082/tree/master/%E5%8F%B0%E7%A7%91%E7%89%A9%E4%BB%B6%E5%B0%8E%E5%90%91/gloomhaven/gloomhaven
Егор
Hi everyone
Anonymous
Hi everyone 👋
Anonymous
https://bit.ly/2MMzNny Someone answer this
Anonymous