バレンタインがいない柴(食用不可)
i just tried - even doing chmod +R a+rwx for the whole parent directory doesn't seem to make it work
バレンタインがいない柴(食用不可)
(it did work - and i'm sure the path + its permission has no issue...)
Anonymous
Since you have allocated memory, you can easily forget to free it! L == logic!
Ok Managing a memory yourself is a bad practice in modern C++ for 99% cases, no? RAII, smart pointers, that's kind of stuff
Anonymous
declaration of variable of type "reference to int" and initialization of it by reference to dynamically created object of type int which is initialized to value 2.
Yeah but i was thinking that in that case expression should look like this int &j = new int(2); Since new returns address of the newly created object. Thing that is confusing is this * before new. Shouldn't * means access to variable on following addres?
Anonymous
@MasterZiv Thank u for clarification! We finally got it. It is possible that reference accept object and not its address, that is why there is * to new cuz new returns address. God bless you!
Anonymous
Whats the best way to draw a quad in openGL?
Anonymous
Like the vertex positions
Anonymous
https://img.kingdev.nl/NVIDIA%20Share_2019-10-30_16-11-04.png
Anonymous
I don't think the way im doing it is suposed to be the correct one
Anonymous
first b stand for back, second is for bottom or top
Anonymous
/warn
Anonymous
sorry
Anonymous
Plzz anyone send e book of c++
Anonymous
I cant search online
01000001011011010100000101101110
http://www.cppreference.com/ http://www.cplusplus.com/
Anonymous
Is that math or programming?
It’s programming c++
Anonymous
I have two versions of C++ primer, Chinese edition and English edition.
Anonymous
I have two versions of C++ primer, Chinese edition and English edition.
I mean English edition please i want English edition
András
It’s programming c++
How do you want to write analytycal solution of your task?
01000001011011010100000101101110
libgen.is
It isn't working
Anonymous
Works here
Anonymous
I mean English edition please i want English edition
If you really need, I'll send you tomorrow. It's middle night in China right now. Plus, I am going to sleep.
Anonymous
Hi friends
Augmented
hello friends
klimi
hi
Anonymous
Hello
Augmented
struct TEST { char x[3]; TEST(char p1, char p2, char p3) : x({p1,p2,p3})
Augmented
it this okay?
Anonymous
its x{p1, p2, p3} not x({p1, p2, p3})
Augmented
バレンタインがいない柴(食用不可)
Hi, I'm finding some examples from google but can't find one - for decrypting an encrypted string with RSA (key pairs + passphrase) with openssl
バレンタインがいない柴(食用不可)
are you able to point me to some example code?
バレンタインがいない柴(食用不可)
thanks!
14•08
🙄
klimi
Pavel
I have some troubles understanding why this code doesn't compile. https://ideone.com/Tgah7B If I call test1 instead of test2 or in test2 just return the result of test1 (without introducing a local variable), then it compiles fine.
Pavel
It says error: ‘a’ is not a constant expression but that doesn't seem to be a problem in case without variable b and in case of test1 where a has the same type.
Bennie
It says error: ‘a’ is not a constant expression but that doesn't seem to be a problem in case without variable b and in case of test1 where a has the same type.
In c/c++ your case statements in the switch block should be resolved to a constant value, as the code makes branch decisions on it. If you need a variable case statement you can use another switch statement at that position. Try to keep the complexity in the code down for all involved 😏
Anonymous
Hey some one help me Plzz send me ebook of c++programming.
WHITE DEVIL
lol
Pavel
Basically to rephrase the problem (code is still here https://ideone.com/Tgah7B) I have a constexpr string hashing function and I want to have another constexpr function that wraps this function and does some static_asserts on the hash value before returning it. But if I introduce a local variable with the resulting hash (b) in the second function it stops compiling with error "error: ‘a’ is not a constant expression". And I can't understand why, because a is the same in both cases.
Bennie
It says error: ‘a’ is not a constant expression but that doesn't seem to be a problem in case without variable b and in case of test1 where a has the same type.
Looking at the code this time and not at the message - your "test" code is unresolved at "compile time" that is what constexpr implies. Not at a laptop right now, try to define the "int test = 6;" or "const int test = 6;"
Bennie
Understanding constexpr specifier in C++ - GeeksforGeeks https://www.geeksforgeeks.org/understanding-constexper-specifier-in-c/
Bennie
The int test MUST be global, must be constant. If it is in text format you MUST eval it to a c++ expression
Pavel
I have some troubles understanding why this code doesn't compile. https://ideone.com/Tgah7B If I call test1 instead of test2 or in test2 just return the result of test1 (without introducing a local variable), then it compiles fine.
Ok, seems like I can't create a constexpr variables in this case, because it makes no sense for the compiler (the function itself is constexpr, so constexpr local variable would mean that it should be precalculated for all the function variants at once, but it's dependent on a parameter). So the error was correct I just needed to think deeper. I replaced it to const and it started to compile. But it turned out that I can't use static_assert for such variables, so I found a working solution for it here: https://stackoverflow.com/questions/50160057/cleanly-report-compile-time-error-from-constexpr-without-exceptions The resulting code that seem to work fine (but I will need to find an analogue for Windows): https://ideone.com/JpWyve
Ludovic 'Archivist'
no it is not stupid.
Man, this calls to be a memory leak. One doesn't store a pair of manually allocated ints as a reference
Ludovic 'Archivist'
No
"No" what? This code reeks of so much bad practice it makes me sick
Ilya
"No" what? This code reeks of so much bad practice it makes me sick
No, this is code snippet you can't judge by this part if there is memory leak or not. Because this is only a part of the program
Ludovic 'Archivist'
No, this is code snippet you can't judge by this part if there is memory leak or not. Because this is only a part of the program
It is not a memory leak, I screams to become one. It makes no semantical sense, and all the alternatives to it look better and are more functional
Ludovic 'Archivist'
Ilya
Yes
So, the piece of code is this: int &j= *new int(2);Why don't you like this? because it is stored not to a pointer to int but to reference to int ?
Ludovic 'Archivist'
It is on the same level of cleverness as volatile int f() { return 4; }
Ludovic 'Archivist'
what is 'volative' ?
In this context? It does exactly nothing
Ludovic 'Archivist'
But is valid C++
Où va le monde
Who can Help with filesystem,with Reading Files,i'll send screen
Ilya
In this context? It does exactly nothing
Probably you meant volatile ?
Ludovic 'Archivist'
So, the piece of code is this: int &j= *new int(2);Why don't you like this? because it is stored not to a pointer to int but to reference to int ?
First, you abandon size information, unless you are good friend with your allocator, that may be semantically lost at compile time, then you abandon pointer semantics and typing which are precisely here to remind you need to clean that