luv2design
Guest
|
Posted:
Thu Dec 16, 2004 5:13 pm Post subject:
Help needed |
|
|
Hi All,
I need to intialize an float array[n]={<filename>};
i.e
I need float array[n]=(a,b,c,....}
These a,b,c.... should be from a file in my PC.
how do i do this in CCS.
Thanks in Advance,
Luv2design |
|
Randy Yates
Guest
|
Posted:
Thu Dec 16, 2004 5:38 pm Post subject:
Re: Help needed |
|
|
"luv2design" <suresh_porwar@yahoo.co.in> writes:
| Quote: | Hi All,
I need to intialize an float array[n]={<filename>};
i.e
I need float array[n]=(a,b,c,....}
These a,b,c.... should be from a file in my PC.
how do i do this in CCS.
|
#define FLOAT_ARRAY_COUNT
float array[FLOAT_ARRAY_COUNT];
int main(int argc char* argv[])
{
FILE* floatFile;
floatFile = fopen("floatfile.dat", "r");
fread(array, sizeof(float), FLOAT_ARRAY_COUNT, floatFile);
fclose(floatFile);
.
.
.
}
--
Randy Yates
Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA
randy.yates@sonyericsson.com, 919-472-1124 |
|