| www.delorie.com/archives/browse.cgi | search |
| From: | "P K" <paulkennedy AT citlink DOT net> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Help needed with a program I am writing |
| Lines: | 26 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
| Message-ID: | <dPE24.416$wM4.28044@news-west.eli.net> |
| Date: | Mon, 06 Dec 1999 02:02:49 GMT |
| NNTP-Posting-Host: | 170.215.184.199 |
| X-Complaints-To: | abuse AT citlink DOT net |
| X-Trace: | news-west.eli.net 944445769 170.215.184.199 (Sun, 05 Dec 1999 19:02:49 MST) |
| NNTP-Posting-Date: | Sun, 05 Dec 1999 19:02:49 MST |
| Organization: | Citlink NewsReader Service |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Ok,
I am a newbie to DJGPP and I dont understand what this error means or how to
fix it:
invalid types `float[360][float]` for array subscript
I get that 4 times when I try to compile the program. The piece of code I
think it is refering to is when I try to make my sine and cosine tables.
This is the code I have for them:
float cos_table[360], sin_table[360];
float pi = 3.14159;
for(a = 0; a < 360 ; a++)
{
cos_table[a]=cos((float)a/180 * pi);
sin_table[a]=sin((float)a/180 * pi);
}
Ive tried taking the float decleration for the a variable in both lines but
still get the error, I also tried making the array types doubles but it
didnt work either. In case your wondering what the program is designed to do
its a primitive raycasting engine Im making for a project due next week. If
you have any suggestions on how to fix this please let me know by either
post or e-mail. Any and all help is appreciated and thank you in advance
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |