Thursday, 5 September 2013

Passing structure to a template function in C++

Passing structure to a template function in C++

I have 24 different types of structures say,
struct a
{
int x;
char *y;
}
struct b
{
Char *a;
int b;
}
meant to say all the 24 structures are having distinct members.
I want to pass these structures to a template function, which has to
extract the values from these structure member variables, concatenate as a
single string and has to return. Please give me your suggestions.

No comments:

Post a Comment