<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by ***skyblue***</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Sat, 21 Nov 2026 02:46:28 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>CStructure get wrong data problem</title>
            <link>http://forum.lowyat.net/topic/769059</link>
            <description>typedef struct &lt;br /&gt;   {&lt;br /&gt;      char a[10];&lt;br /&gt;      char b[10];&lt;br /&gt;   }mystruct;&lt;br /&gt;&lt;br /&gt;   main()&lt;br /&gt;   {&lt;br /&gt;      mystruct z;&lt;br /&gt;	&lt;br /&gt;      z.a = &amp;quot;telephone&amp;quot;;&lt;br /&gt;      z.b = &amp;quot;networking&amp;quot;;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;      printf(&amp;quot;z.a is %s&amp;#092;n&amp;quot;, z.a);   &lt;br /&gt;      printf(&amp;quot;z.b is %s&amp;#092;n&amp;quot;, z.b); &lt;br /&gt;&lt;br /&gt;     myfunc(&amp;amp;z);&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;  Print out: z.a is telephone&lt;br /&gt;                z.b is networking&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   void myfunc(mystruct* z)&lt;br /&gt;   {	&lt;br /&gt;      printf(&amp;quot;z-&amp;gt;a is %s&amp;#092;n&amp;quot;, z-&amp;gt;a);   &lt;br /&gt;      printf(&amp;quot;z-&amp;gt;b is %s&amp;#092;n&amp;quot;, z-&amp;gt;b); &lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;  Print out: z-&amp;gt;a is telephone&lt;br /&gt;                z-&amp;gt;b is orking&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  My question: This is the problem I facing now. The structure member z-&amp;gt;b prints the wrong information when I pass it through a function parameter. It prints the value in &amp;quot;orking&amp;quot; whereas the expected value is &amp;quot;networking&amp;quot;. I think it is because of the structure memory wrong, but I don&amp;#39;t know how to solve it.  &lt;br /&gt;&lt;br /&gt;   It may be the problem of structure alignment. I had tried to add a char padding[4]; after the structure member char a[10];, but it prints the z-&amp;gt;b value in &amp;quot;ng&amp;quot; only whereas the expected value is &amp;quot;networking&amp;quot;. &lt;br /&gt;&lt;br /&gt;   Please help me to solve this problem because &lt;span style='color:red'&gt;it had wasted my 3 days&lt;/span&gt; to debug it.  &lt;!--emo&amp;:(--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /&gt;&lt;!--endemo--&gt;</description>
            <author>***skyblue***</author>
            <category>Codemasters</category>
            <pubDate>Sun, 17 Aug 2008 20:59:01 +0800</pubDate>
        </item>
        <item>
            <title>Need help in coding e-Debit</title>
            <link>http://forum.lowyat.net/topic/660562</link>
            <description>Hi, I&amp;#39;m doing a research about e-Debit. Can anyone explain to me about the e-Debit? Explain more on its APDU and encryption. Thank a lots&amp;#33; &lt;!--emo&amp;:)--&gt;&lt;img src='http://static.lowyat.net/style_emoticons/default/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /&gt;&lt;!--endemo--&gt;</description>
            <author>***skyblue***</author>
            <category>Codemasters</category>
            <pubDate>Thu, 27 Mar 2008 10:06:50 +0800</pubDate>
        </item>
    </channel>
</rss>
