Manav
For fun and my_function there's no argument.
Manav
You can see the mangled names, <...> this becomes a part of the function name so we can simplify the signatures
fun2 => void name(void (*)()) void
fun => void name() void
my_function => void name() void
Manav
I hope that clears your doubts, go through this as well: https://katb.in/omipulufobi
Racing D
hi guys , what will be the output of this program written in c : #include <stdio.h>
#define f(a, b) a+b;
#define g(a, b) a*b;
int main() {
// Write C code here
int Y;
Y = 2*f(4, g(3, 5));
printf("Y = %d", Y);
return 0;
}
Racing D
plzz help ?
...
Racing D
what will be the output
...
Racing D
can u explain it in deta
Racing D
plz
...
Racing D
even we use float, the result will not change
...
even we use float, the result will not change
#include <stdio.h>
int f(int a, int b){
return a+b;
};
int g(int a, int b){
return a*b;
}
int main() {
// Write C code here
int Y;
Y = 2*f(4, g(3, 5));
printf("Y = %d", Y);
return 0;
}
...
...
#include <stdio.h>
template<typename T>
T f(T a, T b){
return a+b;
}
template<typename T>
T g(T a, T b){
return a*b;
}
int main() {
// Write C code here
int Y;
Y = 2*f(4, g(3, 5));
printf("Y = %d", Y);
return 0;
}
klimi
The execution order of parameters is not defined in C
klimi
Also sounds like homework
...
Racing D
yes i agree , sounds be correct but why when i use the first program , it didn't work "im begineer "
Racing D
#define f(a, b) a+b;
#define g(a, b) a*b; with these macros
klimi
Oh right you are using macros... That's even more wrong
Racing D
but when i compile it , it worked
Racing D
with macros
Racing D
thanks anyway guys !
Simple Sorcerer
small question on threads POSIX. what is guard_size ? is it extra space if there is not enough stack size ?
Simple Sorcerer
The pthread_attr_setguardsize() function sets the guard size
attribute of the thread attributes object referred to by attr to
the value specified in guardsize.
If guardsize is greater than 0, then for each new thread created
using attr the system allocates an additional region of at least
guardsize bytes at the end of the thread's stack to act as the
guard area for the stack (but see BUGS).
Simple Sorcerer
VD
Simple Sorcerer
Simple Sorcerer
Bala
I need C++ support
Bala
Is there any one
Luca
Please explain problem
Anonymous
Viking
Curtailed list of c++ advanced level interview questions for brush up pls... Can some one share best links or pdf's that they come across??
Anonymous
I would need a dev would help me at suitable cost tho
klimi
Ighor
@belousotroll don’t ask for help in the first ever message in this group
Владислав
Oh.
Владислав
Владислав
Thank you.
Владислав
link: https://godbolt.org/z/Evrcde6zz
I want to learn how to build SQL queries at compile-time. I have already taught my library to retrieve values correctly by name using schema.get<field_name>(index). The remaining challenge is to learn how to construct SQL queries.
The problem with composing queries is that at the point of writing aliases, I need to both prepare the queries, insert them into field names, and select the result type of this query. For nested queries with different transformations, it requires duplicating variables with almost identical queries.
Or perhaps there are existing patterns that are well-suited for solving my problem? Even in the current implementation, an interface with frequent use of 'using _1 = ...; using _2 = ..<_1>; ...' looks cumbersome.
mb something like this, but how...:
using ModifiedMessageTable = ModifySequence<MessageTable,
Modifier<message_id, mod::toString<>, mod::argMax<message_event_time>>,
Modifier<message_event_time, mod::toString<>>,
Modifier<message_body, mod::toHex<>>
>::type;
Bala
Suggest me C++ app
Владислав
No, I meant something else: can you help me determine the direction in which it is worth developing in this matter? I mentioned the problem: with the current architecture, I would have to constantly use "using _(N...);". If you have encountered a similar problem and/or implemented something similar, can you suggest how you solved this issue? For example, one of the solutions I see is to use Boost::Hana, which allows manipulating types as if they were values. However, since I have no experience with the library, I have a weak understanding of when and under what circumstances it would be appropriate to use Boost::Hana and whether it is suitable for the current problem.
Or... is using Boost::Hana an excessive solution, and are there simpler mechanisms for addressing this issue?
So, in essence, I need to implement a type conversion pipeline while preserving the original type. This seems to be a fairly common use case. If there are any pitfalls, I would appreciate hearing about them from more experienced colleagues.
klimi
Bala
三体183号
Okay tq
Suggest watching some videos
Pippi
Abdulmatin_OG
Gaaaaaaa
is there any small project , to work with? I need learn by project. In c++.
Unpaid is okay
Kenshin
Abdulmatin_OG
Why do you want to learn programming?
Firstly I'm studying computer science and I want to be ahead of the class, secondly I don't really have prior experience on it and I really have interest in it
DC
And how do we choose a niche?
It’s depend on what do you want to learn or masters. You have to choose more specific niche such as front end or back end developer or maybe an iot software developer which is more specific and require a specific skill and knowledge.
Abdulmatin_OG
Abdulmatin_OG
Abdulmatin_OG
I can use that to do data analysis?
Abdulmatin_OG
Abdulmatin_OG
Abdulmatin_OG
Mohamed
What is the best site for learning topics of c++
Chat Boss
Владислав Белоусов sent a huge message, it has been re-uploaded as a file
I have an architectural question: I'm trying to separate the domain part in the architecture of ..
Владислав
I have an architectural question: I'm trying to separate the domain part in the architecture of my application, which receives data through FlatBuffers. It describes many structures, like these:
table MyTable
{
field_1:[uint8];
field_2: OtherTable;
field_3: uint;
field_4: uint;
}
Should I duplicate the field definitions in the Entity part and then map them to the structures? I feel uncomfortable with unnecessary duplication, but the Entity should not be aware of FlatBuffers, etc. However, if FlatBuffers are the only channel for receiving data of this type, what should I do?
Ziky
Владислав
I receive data using the FlatBuffers protocol. I need to process this data in the business logic layer and then save it to a database. The question is: would it be a good practice to create an entity in the Entity layer for an independent data representation? If an answer is yes, why? No? Why.
Владислав
Currently, it works like this:
I receive data in FlatBuffers, and some fields are optional. Unpacking the data is also problematic, as I need to validate pointers for null values. When saving these complex nested FlatBuffers structures to a database, I have to write a lot of code for validation and transformation.
If I introduced an additional layer (Entity) and described the entity using standard structures, it would be easier to work with it in other parts of the application.
This is the "Clean Architecture" pattern.