In the ... code that you didn't post, you used T instead of some other type (maybe int?). Whatever type you replaced with T is a good candidate to put in the brackets. Of course, any type can be put there as long as your class can be compiled when T is replaced with that type.

What are you trying to do? You made Foo a class template. Why? The point of making it a template is so that it can work with different types. For example, maybe you have a data member variable that can be an int or a string or a char or a double. Instead of having a different class FooInt, FooString, FooChar, FooDouble, you have one class that is templated and uses T as the type for the data member variable. Then later, you can use Foo<int> or Foo<string> or Foo<char> or Foo<double>.

Try and figure out what you want to be generic. What code do you want to work for different types?

No, my_dollar_account is just a variable like any other variable. If you want an array, you have to create an array. Templates and arrays are two separate subjects, you can use them together, but one has nothing to do with the other.

So if you want an array of Account objects, make one. Or use std::vector which is itself a templated class.

If you are trying to write your own array class using a template, which is a common exercise in learning templates, then you can scrap your Account class. Instead, write an array class that holds ints. When you are done and it is working, replace int with T and make the class a template.

You should probably start with function templates and get comfortable with those first.

Is my_dollar_account cappible of handiling multiple enteries like an array. If so, how does it take care of indexing?

my_dollar_account is an object of a class you defined. So, when you ask whether it is capable of handling multiple entries like an array, it's all up to you. If you define objects of your class to have a member variable that is an array, then it can handle multiple entries. How does it take care of indexing? Anyway you decide.

Instead, write an array class that holds ints. When you are done and it is working, replace int with T and make the class a template.

I think that is the best approach as well. At this point, it's apparent you've chosen an example that is too difficult for you. Try creating a simpler templated class. For instance, declare a template that has one private member variable that you set in a constructor. Then add a simple get() function that returns the member variable. Your goal is to write a template that will handle any type.