complex in map?

Hi,
I am trying to use a map to link strings and complex objects, however i cannot figure out how to pass complex into the declaration of the map.
and yes i have complex.h included

This is what i have tried so far:
1
2
3
4
map<string, complex> table2;
map<string, cmplx> table2;
map<string, complex::complex> table2;
map<string, complex::cmplx> table2;


any suggestions?

thanks all.
You need to specify the template type of complex
map<string, complex<int> > table2;
well that was easy thanks. i was making way harder than needed
Last edited on
Topic archived. No new replies allowed.