Re: [Dev-C++] How do I declare a template class variable and make an instance seperately?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Marcelo D. <mds...@ya...> - 2005-11-07 16:23:09
|
I think you can't call a constructor like a function. You need a Set() Method or this: --- in main() --- HEAP<ELEMENT> A(10); //THIS WORKS FINE /******>>> not here HEAP<ELEMENT> B; // I CAN'T DO THIS *******/ THOUGH...why?? how can I?? int size; cout << "Give the desired size of this heap: " << endl; cin >> size; /*****>>> here <<<*****/ HEAP<ELEMENT> B(size); // I CAN'T DO THIS INSTANTIATE B DOWN HERE (o_o) - mds GATBRASIL _______________________________________________________ Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ |