<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'Help with Structures and Pointers' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'Help with Structures and Pointers' posted on the 'Beginner C/C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Mon, 17 Jun 2013 23:19:26 -0700</pubDate>
    <lastBuildDate>Mon, 17 Jun 2013 23:19:26 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Help with Structures and Pointers</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/429183/429183/help-with-structures-and-pointers/</link>
      <description>Hello Forum. I am a newby and trying to get some C code to compile for an embedded system using the Microchip C30 compiler. Whilst there are many examples of simple structures on the net, not all of these will compile in my environment, not sure if it is my code(C++ or C), compiler or simple mistakes.&lt;br /&gt;
Please could you advise me on the following code for a nested structure and some pointers. I cannot get it to compile!&lt;br /&gt;
&lt;br /&gt;
struct channelStruct					&lt;br /&gt;
{&lt;br /&gt;
	unsigned long int sampleIndex;&lt;br /&gt;
	int value;						&lt;br /&gt;
}channelData,*channelDataPtr;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
struct dataSetStruct&lt;br /&gt;
{&lt;br /&gt;
	int channel;&lt;br /&gt;
	struct channelData channelData;&lt;br /&gt;
} data, *dataPtr;&lt;br /&gt;
 						&lt;br /&gt;
void dataStructInit()&lt;br /&gt;
{&lt;br /&gt;
//make first entry of sampleindex &amp;amp; value for each channel 0.&lt;br /&gt;
int i=1;&lt;br /&gt;
&lt;br /&gt;
dataPtr=&amp;amp;data;&lt;br /&gt;
	&lt;br /&gt;
while (dataPtr-&amp;gt;channel&amp;lt;=6)&lt;br /&gt;
	{						&lt;br /&gt;
		dataPtr-&amp;gt;channel=i;		&lt;br /&gt;
		channelDataPtr=&amp;amp;(dataPtr-&amp;gt;channelData);	&lt;br /&gt;
//I GET SYNTAX ERROR BEFORE '=' HERE!&lt;br /&gt;
	&lt;br /&gt;
		channelDataPtr-&amp;gt;channelData-&amp;gt;sampleindex=0&lt;br /&gt;
		channelDataPtr-&amp;gt;channelData-&amp;gt;value=0;&lt;br /&gt;
		i++;&lt;br /&gt;
		&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/429183/429183/help-with-structures-and-pointers/</guid>
      <pubDate>Sun, 12 Aug 2012 15:26:28 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
  </channel>
</rss>