![]() |
Look-Up Table
Would this concept be valid:
table(1)=5; i=1 j=0 j=table(i); "J"should return 5. In BASIC, I would have to set the start to be 0, use a dim to se ther range to X. Is this necessary in C? Thanks In Advance |
Re: Look-Up Table
Quote:
At least show all variable declarations and functions with the important algorithm chopped off. I'm sorry, but the code pieces you show aren't detailed enough (they don't show types or declarations -- just use bogus numbers or something) I assume what you have in the code is something like: Code:
/* Make sure to initialize your array. */ |
Re: Look-Up Table
Yes, I believe that was my answer. I assume that I can delacre my array outside all functions and have it available everywhere too. My example would work in Basic(hopefully) :)
|
Re: Look-Up Table
Is this the proper format then for a table:
rom const int table[5]={1, 2, 3, 4, 5}; Will the multiple lines confuse it? |
Re: Look-Up Table
Quote:
|
| All times are GMT -5. The time now is 04:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi