Click here to Skip to main content
15,914,488 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCalling C# web service from c++/MFC Pin
fajlerköaölgja19-Sep-04 22:09
fajlerköaölgja19-Sep-04 22:09 
Generalstupid question Pin
eli1502197919-Sep-04 21:49
eli1502197919-Sep-04 21:49 
GeneralRe: stupid question Pin
fajlerköaölgja19-Sep-04 22:33
fajlerköaölgja19-Sep-04 22:33 
GeneralRe: stupid question Pin
eli1502197919-Sep-04 23:10
eli1502197919-Sep-04 23:10 
GeneralApplying Windows XP Visual Style Pin
aninddroy19-Sep-04 21:18
aninddroy19-Sep-04 21:18 
GeneralAdding IPv6 address programatically Pin
Alpha Siera19-Sep-04 19:13
Alpha Siera19-Sep-04 19:13 
GeneralTEMPLATE FUNCTIONS Pin
ISUstudent19-Sep-04 18:56
ISUstudent19-Sep-04 18:56 
GeneralRe: TEMPLATE FUNCTIONS Pin
Antti Keskinen19-Sep-04 23:08
Antti Keskinen19-Sep-04 23:08 
This looks like a homework assignment, so I won't give you a ready solution, but will point out a few steps that will help you forward.

Templated functions are declared as follows:
template<typename Type>
void sortArray(Type* ptrArray, unsigned int nSize);
This is a declaration of a templated function that takes a pointer to the first cell of the array, and the size of the array. To pass a whole array, change the first parameter to Type tgtArray[].

The key is to first write a function that does the job for, say, an array of integers. Then, by interpreting and understanding the above declaration, you can easily change the function to support any type that has comparison operators (< and >) defined. This includes all basic types (int, char, float, double etc)

Hope this helps

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralPragma Pin
caoquanghanh19-Sep-04 18:43
caoquanghanh19-Sep-04 18:43 
GeneralRe: Pragma Pin
Ramkrishna Pawar19-Sep-04 20:19
Ramkrishna Pawar19-Sep-04 20:19 
GeneralRe: Pragma Pin
caoquanghanh22-Sep-04 19:47
caoquanghanh22-Sep-04 19:47 
GeneralRe: Pragma Pin
Alpha Siera20-Sep-04 3:06
Alpha Siera20-Sep-04 3:06 
Generalcircular linked lists Pin
jhorstkamp19-Sep-04 17:42
jhorstkamp19-Sep-04 17:42 
GeneralRe: circular linked lists Pin
Antti Keskinen19-Sep-04 23:28
Antti Keskinen19-Sep-04 23:28 
GeneralString stuff Pin
Timothy Grabrian19-Sep-04 17:02
professionalTimothy Grabrian19-Sep-04 17:02 
GeneralRe: String stuff Pin
Aamir Butt20-Sep-04 0:06
Aamir Butt20-Sep-04 0:06 
GeneralRe: String stuff Pin
David Crow20-Sep-04 6:00
David Crow20-Sep-04 6:00 
GeneralRe: String stuff Pin
Timothy Grabrian20-Sep-04 11:59
professionalTimothy Grabrian20-Sep-04 11:59 
GeneralRe: String stuff Pin
David Crow20-Sep-04 16:52
David Crow20-Sep-04 16:52 
GeneralRe: String stuff Pin
Archer28220-Sep-04 13:16
Archer28220-Sep-04 13:16 
Generalchanging text color Pin
Jump_Around19-Sep-04 15:19
Jump_Around19-Sep-04 15:19 
GeneralRe: changing text color Pin
Archer28219-Sep-04 16:09
Archer28219-Sep-04 16:09 
GeneralRe: changing text color Pin
Sujan Christo20-Sep-04 1:52
Sujan Christo20-Sep-04 1:52 
Generalmaking your app upgradable Pin
mickelliot19-Sep-04 15:05
mickelliot19-Sep-04 15:05 
GeneralRe: making your app upgradable Pin
Christian Graus19-Sep-04 15:59
protectorChristian Graus19-Sep-04 15:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.