Strategy to pass custom structures to a function

If I'd want to use a function with a lot of custom structures, which is the correct way ?
- Have I dot write a file with all my structures and include it the classes that are going to use it ?
- A template only works with basic types ? If i want to use with custom structures I have to include it , isn`t?
- By last, is it preferable to use templates agaist define a lot of overloaded functions ?

Thanks
- Have I dot write a file with all my structures and include it the classes that are going to use it ?

What other way is there (other than having many files with one class declaration each)?

- A template only works with basic types ?

No, it works with all types.

If i want to use with custom structures I have to include it , isn`t?

What?

- By last, is it preferable to use templates agaist define a lot of overloaded functions ?

Obviously. Why exactly are you having doubts?
I have undefined error when I try to use a template function passing a instance of a struct.
So, I dont know how to fix this error ?
Thanks
Post the code and the exact error message you're getting and we'll help you out.


solved:
I had a #include fileA.h at my .h file and into my cpp file .
By any reason the compiler was making something strange.
Topic archived. No new replies allowed.