I am unable to add anything to this structI can't understand why I am
getting a Segfault:
#include <stdio.h>
struct macd
{
int price;
};
void print_combo( struct macd* );
int main(void)
{
struct macd* my_combo = NULL;
my_combo->price = 100;
return 0;
}
void print_combo( struct macd* mc )
{
if( mc )
{
printf("Price = %d\n", mc->price);
}
}
--
my email is @ the above blog.
getting a Segfault:
#include <stdio.h>
struct macd
{
int price;
};
void print_combo( struct macd* );
int main(void)
{
struct macd* my_combo = NULL;
my_combo->price = 100;
return 0;
}
void print_combo( struct macd* mc )
{
if( mc )
{
printf("Price = %d\n", mc->price);
}
}
--
my email is @ the above blog.
Comment