| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Task list |
Henk den Adel wrote in a message to All:
HdA> printf("%s\n", *pswblk.aswentry.swctl.szSwtitle);
HdA> The problem is that the added line (printf) contains an
HdA> error:
HdA> TL.C(31:19) : error EDC0110: Operand of dot operator must be
HdA> a struct or a union.
HdA> It is a struct!
The problem is the operator precedence. the dot operator is executed
*before* the dereference operator, this is why the -> operator was
invented.
Following two options should be correct:
printf("%s\n", (*pswblk).aswentry.swctl.szSwtitle);
printf("%s\n", pswblk->aswentry.swctl.szSwtitle);
The compiler was right (as usual :-))
mvg/wr
--- timEd/2 1.01.g3+
* Origin: LightHouse BBS ==> I am a H.U.G.O. Member ! (2:285/324.3)SEEN-BY: 105/42 620/243 624/300 711/401 409 410 413 430 807 808 809 934 955 SEEN-BY: 712/407 515 628 704 713/888 800/1 7877/2809 @PATH: 285/324 37 32 1 280/801 24/24 396/1 270/101 105/103 42 712/515 711/808 @PATH: 711/809 934 |
|
| 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™.