What assignment statement sets Price member of struct pointer to PC to 100?
Here is its code:
I used *PC.Price = 1000.0 but it didn't work, please help?Code:{ char Manufacturer[30]; float Price; int Memory; }*PC;
cj
What assignment statement sets Price member of struct pointer to PC to 100?
Here is its code:
I used *PC.Price = 1000.0 but it didn't work, please help?Code:{ char Manufacturer[30]; float Price; int Memory; }*PC;
cj
Last edited by correlcj; 08-05-2002 at 04:57 PM.
Have you initialized your pointer?
Try this:
struct blah
{
char Manufacturer[30];
float Price;
int Memory;
}*PC;
...
struct blah p;
PC = &p;
PC->Price = 1000.0;
Voila!
One hundred posts later and you still can't get code tags working. And you still ignore your compiler's warning messages too I'll bet.
[code]
YOUR CODE HERE
[/code]
It is not a difficult concept.
Quzah.
Hope is the first step on the road to disappointment.