|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I couldnt find how to point of struct
typedef struct _guitar { int serial; int price; char type[18]; char builder[18]; char model[18]; }guitar ; void func(); guitar active; I want to send active.serial, active.price, active.builder, active.type, active.model, how can I do???? void funct2( ???????? (this structer's pointer) how can I do???) how can I use active data of struct guitar me please |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
In article <c2251762-c2e3-4ca5-a217-03c7f3180a25@e10g2000prf.googlegroups.com>,
emre esirik(hacettepe computer science and engineering) <emreesirik@gmail.com> wrote: >I couldnt find how to point of struct >typedef struct _guitar { > int serial; > int price; > char type[18]; > char builder[18]; > char model[18]; >}guitar ; >void func(); > guitar active; > I want to send active.serial, active.price, active.builder, >active.type, active.model, how can I do???? Individually, &active.serial, &active.price, &active.builder, &active.type, &active.model The structure as a whole: &active >void funct2( ???????? (this structer's pointer) how can I do???) > how can I use active data of struct guitar void funct2( guitar *gptr ) { if (gptr->price > 1000000) { printf( "Guitar serial #%d is one expensive guitar!\n", gptr->serial ); } } -- "Any sufficiently advanced bug is indistinguishable from a feature." -- Rich Kulawiec |
|
![]() |
| Outils de la discussion | |
|
|