Ghasem
Anonymous
Ghasem
Danya🔥
If they want, they can learn how to make concepts themselves
Anonymous
I don't think it's a great idea
Because you can use a type trait in the requires clause anyway but it'll be worse in the long run because of constraint subsumption
Yes. Using derived_from is the right way. I didn't suggest that he should use is_base_of and not derived_from.
The question was : is there an equivalent of constraints in C++? The answer to that was concepts which is applicable since C++20. If he is not using C++20, then std::is_base_of trait is a good enough alternative.
Now assuming he builds a concept from std::is_base_of, you are right that derived_from and this new concept that he developed will be equivalent and this will be a problem and can lead to ambiguity like you said.
Again, I am not suggesting that he should not use derived_from. Clearly that is the best idea if he is using C++20. My suggestion was to use the trait if he is not familiar with concepts or if he is not using C++20 which many of us still aren't.
Danya🔥
/unmute @ancientgc
Tia
Hey everyone! I am new to C. I recently had my first interview and I failed it but I have screenshots question can anybody help me to find the solutions?
Ziky
𝔖𝔞𝔯𝔬
𝔖𝔞𝔯𝔬
I Want compile errors when I attend to use a type in the template wich doesn’t inerehit from a certain class
Anonymous
#include "stdio.h"
using namespace std;
int main{
return 0;
}
Anonymous
Anonymous
Can anyone send me the link for c++ free books
Danya🔥
Anonymous
😂😂😂
shriman_deepak
IDCAN
How can i inline assembly code into my C++ code. I'm using cmake and MSVC 19.34.31942.0 compiler?
IDCAN
Does MSVC 19.34.31942.0 compiler support inline assembly code for build x64 architecture?
Anonymous
🥀
Any ideas for c langauge project?
Anonymous
✋ Hi, I have the exercise: Create a program that contains a float array containing 3 rows and 3 columns.Print the address of each position in this matrix. This my solution: for(int i = 0;i < 3;i++){ for(int j = 0;j < 3;j++){
std::cout<<(number+i)+j<<" "; }
std::cout<<"\n";}
OUTPUT-> 0x7afdf0 0x7afdfc 0x7afe080x7afdfc 0x7afe08 0x7afe14
0x7afe08 0x7afe20 0x7afe20
Anonymous
In positions 0.1 and 1.0 have the same address as well as 0.2 and 1.2 and 2.0 why is my code wrong? If you are
someone who will please explain to me why I don't understand why this return.
Ziky
(number+i)+j
Ziky
because of this I guess
try &(number[i][j])
Anonymous
Anonymous
One more question reading an array through pointer armath could be like this? std::cin>>*(n+i);
Ziky
Nothing
include <stdio.h>
int add(int num1, int num2) {
printf("\n%d", num1+num2);
Should i write int or void
The question was
1) Write a program that declares a pointer to a function that takes two integers as arguments and returns an integer. The program should then use the pointer to call the function with two integers and print the result.
Nothing
Int add or
Void add
klimi
Nothing
DaviChan
DaviChan
and can be as easy or complex as you want
Christian
hello, anyone here have experience interfacing from c++ client (uWebSockets) to Flask-SocketIO server? Or know if it is even possible.
Anonymous
I’m new in C++ any expert should me with assignments
Guillermo
If you want assignents, look at Project Euler :)
h
Ya deway
Hi all I'm having some problem with pointers in C (again)... I use this function to split only the first substring that ends with "\r\n\r\n" (there are more than one, I would like extract data starting from the string and ending at the first match). I use the following function but I get Segmentation Fault (core dumped) https://pastebin.com/XvGnMjtJ
Danya🔥
First of all
for (i = 0; i < input_length - 3; i++) {
This should be - 4
Danya🔥
Second of all in the second loop you go beyond strlen of the string
Danya🔥
You should just use C++
Dima
Danya🔥
Ya deway
Damn, u right lol
Anonymous
what is data memory allocation,?
Danya🔥
Sleeves
Hey people, say you have a value you want hardcoded into your program (exe), in the program , the value is fed as part of a powershell script that will be base64 encoded. How can I do this ? The value is to be collected from users and the exe must be compiled with the value.
Prinzkyd
Sleeves
Sleeves
assign it ?
Prinzkyd
Sleeves
Yh
can u maybe send a resource or link. I have no idea what u mean by that
Prinzkyd
Ok I'm coming
Anonymous
Guillermo
Anonymous
Tokin
Tokin
Is this what portable executable is?
Tokin
So by using binary patcher or hex editor you gotta change the right bytes under data section of the .exe? Hm
Tokin
It probably wont block if its cert signed and your cert got reputation
Brixn
Anyone to debug c code form me just 3errors
Ziky
Tokin
klimi
yes
Ya deway
hello everyone today I am facing another string problem, . I have a pointer to a string to modify, i.e. I have to insert another string in a certain position and keep the rest unchanged. The string is made up of many \r\n, I'm using a function that is effective only in certain situations. Can anyone explain the following function to me better and why Is not working well ? https://pastebin.com/39invi7c? (It print only the start to the injected string, not the rest). Thanks again for all Ur support
Ya deway
Ziky
new_payload[header_len + strlen(custom_head)] = '\0';