class _> struct

Hi all.
Please, help me in this. I've that strange template class and I want make with it the struct. But I just don't understand what do in it "c(id)(seek)(prompt)(short)". What with it eating?
1
2
3
4
template <class C>
void shortt(C &c){
c(id)(seek)(prompt)(shortt);
}
Last edited on
I'm sorry what?
I dont understand what you're trying to say.
Last edited on
The void function takes a class object, then uses whatever values those are.
->The void function takes a class object, then uses whatever values those are.
Thanks.
How to rewrite that from c++ to c? Construct might to present as function, but what do with 're str1'?
Please, sample.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class re{
        pc* a;
        pc_excld* b;
public:
        re(const char* s){
                const char* err; int erro;
                a = pc_cli(s, NULL, &err, &erro, 0);
                b = pc_st(r, 0, &err);
        }
        ~re(){
                if(a) pc_free(a);
                if(b) pc_free(b);
        }
        int sett(const char* s, int l){
                int m[30];
                return pc_ex(l,m);
        }
        int sett(const char* s, int l, int* m, int xl){
                return pc_ex(l,m, xl);
        }
};

re str1("(?i)\\nDelivered-To:\\s*(.*?)[\r\n]");
re str2("(?i)\\nX-ResentFrom:\\s*(\\d+)");
I'm no expert but I'm pretty sure that C doesnt have templates, I think that was one of the upgrades of C++ because C uses macros instead of templates
Last edited on
Topic archived. No new replies allowed.