<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Homework Help! - C++ - tribe.net</title>
  <link rel="alternate" href="http://cpp.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55?format=atom" />
  <subtitle>Tribe.net. Local Connections</subtitle>
  <entry>
    <title>Homework Help!</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#be61cf58-84e4-4b27-8be6-db5fda2d5681" />
    <author>
      <name>Zack</name>
    </author>
    <id>http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#be61cf58-84e4-4b27-8be6-db5fda2d5681</id>
    <published>2004-03-16T21:20:41Z</published>
    <summary type="html">Alright, i told y'all you'd be helpin me soon&#xD;
&#xD;
heres my first problem:&#xD;
Why is this function telling me that i'm not using an array?&#xD;
i passed it an array with the x and y floats but i keep geting the error, or should they not be floats?&#xD;
&#xD;
float segmentLength(float, float, float, float);&#xD;
float polygonPerimeter (float x, float y, int pnts)&#xD;
{&#xD;
	float d;&#xD;
	int i;&#xD;
	for (i=0; i&amp;amp;lt;pnts; i++);&#xD;
	&#xD;
		d = segmentLength (x[i], x[i+1], y[i], y[i+1]);&#xD;
&#xD;
	return 0;</summary>
    <dc:creator>Zack</dc:creator>
    <dc:date>2004-03-16T21:20:41Z</dc:date>
  </entry>
  <entry>
    <title>Re: Homework Help!</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#0e0dc2c9-cb95-412e-8548-85886332dd45" />
    <author>
      <name>Bill</name>
    </author>
    <id>http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#0e0dc2c9-cb95-412e-8548-85886332dd45</id>
    <published>2004-03-16T23:46:14Z</published>
    <summary type="html">IT's telling you x and y are not arrays because you have declared them as floats. They should be *(float* x, float* y, int pts)&#xD;
It doesn't matter what you call it with if you declare it improperly.</summary>
    <dc:creator>Bill</dc:creator>
    <dc:date>2004-03-16T23:46:14Z</dc:date>
  </entry>
  <entry>
    <title>Re: Homework Help!</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#e66355ae-bf5c-4f09-9889-21f04d6ce956" />
    <author>
      <name>Bill</name>
    </author>
    <id>http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#e66355ae-bf5c-4f09-9889-21f04d6ce956</id>
    <published>2004-03-16T23:47:16Z</published>
    <summary type="html">Without the star in front of the parenthesis. I think tribe did that. That's what I get for not previewing.</summary>
    <dc:creator>Bill</dc:creator>
    <dc:date>2004-03-16T23:47:16Z</dc:date>
  </entry>
  <entry>
    <title>Re: Homework Help!</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#c3ca024a-2f2f-4851-be03-d006212d6a9a" />
    <author>
      <name>Zack</name>
    </author>
    <id>http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#c3ca024a-2f2f-4851-be03-d006212d6a9a</id>
    <published>2004-03-17T06:40:22Z</published>
    <summary type="html">but when i do that it just gives me  a different error, i think it was "array or pointer type" error. so does that mean the problem is back in the 'main' funtion?&#xD;
&#xD;
also, i guess i should have said the purpose of this funtion is to give the perimeter of a polygon. not that that changes the situation.</summary>
    <dc:creator>Zack</dc:creator>
    <dc:date>2004-03-17T06:40:22Z</dc:date>
  </entry>
  <entry>
    <title>Re: Homework Help!</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#1b5c08e1-9a33-4576-9402-ba5b32dea9b6" />
    <author>
      <name>Bill</name>
    </author>
    <id>http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#1b5c08e1-9a33-4576-9402-ba5b32dea9b6</id>
    <published>2004-03-17T15:13:26Z</published>
    <summary type="html">This compiles fine, at least on its own (notice that I got rid of the semicolon at the end of the for also, this was an empty for followed by one single segmentLength execution). If there is any other problem it is in the caller of polygonPerimiter or within segmentLength. Try to follow all the other changes and figure out why I did them. Each one is important.&#xD;
&#xD;
float segmentLength(float, float, float, float); &#xD;
float polygonPerimeter (float *x, float *y, int pnts) &#xD;
{ &#xD;
  float d=0.0; &#xD;
  int i; &#xD;
  for (i=0; i&amp;amp;lt;pnts; i++)&#xD;
    d += segmentLength (x[i], x[i+1], y[i], y[i+1]); &#xD;
&#xD;
  return d; &#xD;
}</summary>
    <dc:creator>Bill</dc:creator>
    <dc:date>2004-03-17T15:13:26Z</dc:date>
  </entry>
  <entry>
    <title>Re: Homework Help!</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#263d1c81-1ffb-4dec-90d2-ba5a4d4e97cf" />
    <author>
      <name>Bill</name>
    </author>
    <id>http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#263d1c81-1ffb-4dec-90d2-ba5a4d4e97cf</id>
    <published>2004-03-17T15:15:15Z</published>
    <summary type="html">hint: I left one major problem for you.</summary>
    <dc:creator>Bill</dc:creator>
    <dc:date>2004-03-17T15:15:15Z</dc:date>
  </entry>
  <entry>
    <title>Re: Homework Help!</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#4b77a8da-c6fc-4b78-9f17-3be2ea812372" />
    <author>
      <name>Bartosz</name>
    </author>
    <id>http://CPP.tribe.net/thread/78170b9a-a4e7-4420-905b-05ca95363f55#4b77a8da-c6fc-4b78-9f17-3be2ea812372</id>
    <published>2004-03-23T22:54:45Z</published>
    <summary type="html">Yikes! This is C, not C++.</summary>
    <dc:creator>Bartosz</dc:creator>
    <dc:date>2004-03-23T22:54:45Z</dc:date>
  </entry>
</feed>



