| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Writing structs |
Hello Paul,
In a message dated 19 Oct 96 you wrote to All :
PW> typedef struct Block1024 {
PW> unsigned char Packet_no;
PW> unsigned char Data[1024];
PW> unsigned long CRC;
PW> };
PW> and then went
PW> Block1024 Packet;
PW> (to create a struct called Packet, of typedef struct Block1024), how
PW> would I then write it to a stream? Say, to the screen, to disk or to a
PW> COM port?
fwrite(Block1024Packet.Data, 1024, 1, stream);
where stream is stdout for the screen, a file pointer (opened by eg
filepointer=fopen("filename", "w"); )
I assume you aren't wanting to output the Packet_no or the CRC ;)
Josh Marshall FidoNet 3:640/201.14
Member TEAM AMIGA AmigaNet 41:400/869.14
... Real programmers use punched cards.
--- Mail Manager 1.2x/p #1219
* Origin: It's rude to Point (3:640/201.14{at}fidonet)SEEN-BY: 633/267 270 @PATH: 640/201 201 820 711/409 808 50/99 635/728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.