hi, what shd i add then??sorry for asking, but my first time writting overloading functions. i was not taught overloading for pointers, just normal + only..can give some code snipplets??
Type: Posts; User: ryan_qut
hi, what shd i add then??sorry for asking, but my first time writting overloading functions. i was not taught overloading for pointers, just normal + only..can give some code snipplets??
Hi,
i wanted to overload a + operator to add two objects..i have an error which states "invalid operands `employee *' and `employee *' to binary `operator +'".. i do not know what is wrong with...
Ok i get it now, Thanks alot..
Initially i thought that the contents of num in main will not be changed even after passing to the function.. but it did, i guess its because of the pointer stuff......
Thanks mate,
but i wanted to know to write using pointers method..thanks for ur advice anyway. ;)
//write in C this example
#include <stdio.h>
#include <stdlib.h>
//function to double the value
void doublemynum(int *num_pointer) // (*num_pointer) gets the contents of num which is...
Hi, can anyone pointed out what did i do wrong, i was expecting a 10 and a 20 for the output..Thanks
//write in C this example
#include <stdio.h>
#include <stdlib.h>
Sorry salem,
where should this loop be then?? and shd the printf statement be array[i] or just array?? because i am printing the results of the array after the loop so i dont need the [i] right??...
#define N_ELEMS 5
int main(void)
{
int array[N_ELEMS];
int i;
for(i=0;i<N_ELEMS;i++)
array[i]=i;