Okay the code was messed up, but has been editted now. Problem persists. Please help me out!!!
Type: Posts; User: sakura
Okay the code was messed up, but has been editted now. Problem persists. Please help me out!!!
okay. So I have this code for AVL tree that works fine!
#include<stdio.h>
#include<stdlib.h>
typedef struct node
{
Okay, this may sound lame, but I really can't find an answer.
Who codes the C and C++ standard libraries?
Thanks in advance.
#include<stdio.h>
#include<stdlib.h>
int CompareIntegerDefault(void *data1, void *data2)
{
if(*(int *)data1>*(int *)data2)
return (1);
else if(*(int *)data1==*(int *)data2)
Oh! Thank you so much!
Okay in the following code
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct mystruct
{
#include <stdio.h>
void func(int a, int b=2)
{
printf("%d",a+b);
}
int main()
Okay! I got it! :)
So how do I pass it by reference?
I know why your code doesn't print. But I am passing the structure address only. So why wouldn't it print the value? :(
I have this code which does not print "3" as it is supposed to
#include<stdio.h>
#include<stdlib.h>
typedef struct Node
{
int i;
Hi guys!
Since I did not really get the solution, I will explain my problem with this example.
I have my structure definition in a header like this :
//MystructInt.h
struct my_struct
{
Hi folks,
Say I want to have a structure
//mystruct.h
typedef My_Struct
{
int i;
}my_struct,*my_struct_ptr;
oh..so careless of me! Thanks guys! :)
int func(int a,int b);
{
return(a+b);
}
typedef int (*AddFp)(int,int);
int main()
Thanks for the help! :) :)
typedef struct abc
{
int y;
char *b;
}abc, *abcptr;
abc x={2,"sdgare"};
void *a;
void function(void *data)
Yay!!!! Thank you so much! :)
int main()
{
float a=3.45;
if(a==3.45)
printf("1");
return 0;
}
Can someone please tell me why the above program does not print 1?
Hi,
In the following code, I am passing a void pointer by reference assigning a value to it. But the value is not reflected in the main program.
#include<stdio.h>
void function(void *p)
{...
Yup. My bad! :)
Thanks for the tip!
Yes. I'm sorry. I did include the typedef in my original code. It is not working. Please help me out here!!!
Hi,
I have a func pointer in a structure like this-
struct mystruct
{
int (*fp)(int,int);
}mystruct;