[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Message queues



Hej Mads

Ja du kan godt sende flere char arrays, men bufsize skal være den samlede
størrelse på din struct minus long int.
eks.

struct besked
{
    long int msg_type;
    data et eller andet...
    data et eller andet...
    data et eller andet...
}

#define MESSAGESIZE (sizeof(besked) - sizeof(long int))

Hilsen din instruktor

Christian Haugstrup

> > Hejsa
> >
> > Er det muligt at overføre andet end et char array via en besked kø,
eller eventuelt overføre
> > flere char array's. Jeg har forsøgt at sende en struct der ser ud
nogenlunde som følger, men
> > det havde jeg ikke megen succes med:
> >
> > struct besked
> > {
> > long int type;
> > char data [BUFSIZ]
> > char data1 [BUFSIZ]
> > char data2 [BUFSIZ]
> > };
> >
> > kan man kun overføre ét char array eller hvad?
> >
> > Mads Hemmingsen
>
>



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *