<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=4&amp;t=4639&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2013-10-31T18:12:01+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=4639&amp;mode</id>
<entry>
<author><name><![CDATA[banita 17]]></name></author>
<updated>2013-10-31T18:12:01+01:00</updated>
<published>2013-10-31T18:12:01+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4639&amp;p=54958#p54958</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4639&amp;p=54958#p54958"/>
<title type="html"><![CDATA[inicjalizacja tablicy w strukturze]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4639&amp;p=54958#p54958"><![CDATA[
Cześć. Mam pytanie. Spójrzcie na kawałek &quot;kotu&quot;:<br /><br />1) definiuje nowy typ t_card<br /><br />[syntax=c]typedef struct{<br />uint8_t id&#91;5&#93;;<br />uint8_t status;<br />}t_card;[/syntax]<br /><br />2) definiuje tablice zmiennych o typie t_card<br /><br />[syntax=c]t_card tab&#91;5&#93;;[/syntax]<br /><br />3) no i teraz moje pytanie jak zainicjalizować tablice id[] ale nie w taki sposób:<br /><br />[syntax=c]tab&#91;0&#93;.id&#91;0&#93;=0x00;<br />tab&#91;0&#93;.id&#91;1&#93;=0x01;<br />tab&#91;0&#93;.id&#91;2&#93;=0x02;<br />tab&#91;0&#93;.id&#91;3&#93;=0x03;<br />tab&#91;0&#93;.id&#91;4&#93;=0x04;[/syntax]<br /><br /><br />tylko całą tablice na raz, np coś w tym stylu:<br /><br />[syntax=c]tab&#91;0&#93;.id&#91;&#93;={0x00, 0x01, 0x02, 0x03, 0x04};[/syntax]<br /><br /><br />oczywiście nie pytałbym się gdyby tak się dało. Kompilator na mnie krzyczy. Czy jest jakaś sztuczka na to? czy trzeba tak mało elegancko się rozpisywać? <br /><br />Problem niby mało ważny ale nie lubię takich &quot;kloców&quot; w moim &quot;kocie&quot; stąd pytanie. <br />Pozdrawiam.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=279">banita 17</a> — 31 paź 2013, o 18:12</p><hr />
]]></content>
</entry>
</feed>