I wanted to do this in order to clarify my previous C code when porting it to C++.
So, it's now in this way:
template <class T> T max3bytemplate(T a, T b, T c);
...
Type: Posts; User: Adrian20XX
I wanted to do this in order to clarify my previous C code when porting it to C++.
So, it's now in this way:
template <class T> T max3bytemplate(T a, T b, T c);
...
The one in Visual Studio C++, defined in stdlib.h
Thanks, that's seemed to be a great pointer, I called it polymorphism but it seems it's a template.
Would this be the proper way to do it?
...
Hi,
Sorry for this question if it's too basic but I'm just a C programmer starting with C++, I want to define this polymorphic function __max3 to work for all the different types of numeric...
Fing unreal, have been stuck for almost a day with this :-)
It was supposed to check for ==0 for a tie, not for !=0.
So, it seems that it was my brain that was turned into a mashed potato, for...
Hi,
I don't get what is happening with this code.
// BEGIN DEBUG
iNTies=0;
printf("iNTies: %d\n", iNTies);
if (iNTies!=0) {
printf("Checked all players, player %d has winned",...
I know the difference because of the position, and the way this array is traversed.
In case you are interested, it's an array for holdem evaluations, similar to the one that RayW posted in 2+2.
It seems it's working, thanks!!!!
It compiles now the definition so I guess it works, but I still have to change tons of lines of code that have this as a non union array, and used typecasts...
Hi,
I'd like to do a union that has a pointer to the same union.
I've tried this:
typedef union MyUnion_t {
int value;
MyUnion_t *next;