| | |
How to use typedef for the template structure? What its syntax?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2008
Posts: 86
Reputation:
Solved Threads: 5
•
•
•
•
I didn't get what your syntax says.
Can you kindly explain it..
•
•
•
•
Typedef name is an alias for the type, it's not a new type name.
Can you explain what a problem are you trying to solve with "generic typedef"?
But lets say If i want to create the pointer variable.
like for example normally what we do is
C++ Syntax (Toggle Plain Text)
struct box { ... blah .. blah.. blah }; typedef box *crazy_box; //as we can now easy create the pointer with crazy_box crazy_box B1;
Now I want this to happen with the template structure what to do...
Last edited by Rhohitman; Oct 10th, 2008 at 7:23 pm.
Chazing Dreams ;'P
Shhhh.......ZZzzzzzzzzzzzzzzzzzzzz.....
Shhhh.......ZZzzzzzzzzzzzzzzzzzzzz.....
•
•
•
•
Hehe...
C++ Syntax (Toggle Plain Text)
template<typename T> struct MyGreatBeautifulBox:box<T>{}; int main() { MyGreatBeautifulBox<int> ibox; MyGreatBeautifulBox<char> cbox;
Chazing Dreams ;'P
Shhhh.......ZZzzzzzzzzzzzzzzzzzzzz.....
Shhhh.......ZZzzzzzzzzzzzzzzzzzzzz.....
![]() |
Other Threads in the C++ Forum
- Previous Thread: number of ways to..ehh, i hate counting ways
- Next Thread: Using c++ to send email with smtp
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






