In a simple form, I fully understand how to do this.
On the other hand, when I have:
How can I accomplish this?
Code:
//foo.h
class Foo;
Class Foo
{
void someFunction(int);
}
//foo.cpp
#include <foo.h>
int main()
{
Foo foo;
foo.someFunction(bar);
...
return 0;
Code:
//foo.h
...
namespace myStuff
{
template typename < X, Y, Z >
class Foo
{
void someFunction(int);
}
}; //namespace
//foo.cpp
#include <foo.h>
...
template typename <X, Y, Z>
void Foo::someFunction(int)
{
//whatever
}
//bar.cpp
#include <foo.cpp>
...
Class Bar;
Class Bar
{
...
std::cin >> number;
//call someFunction(number) from here
}
Comment