Discussion in "General help Guidance and Discussion" started by    sachinmm    Apr 21, 2016.
Thu Apr 21 2016, 01:19 pm
#1
I have a txt file, content of file is :

0x1a,0x2b,0xff,0x99,0x55

I need to store all this value into :

unsigned char tempArray[10]={0xaa,0xbb,0xcc,0xdd,0xee,0x00,0x00,0x00,0x00,0x00}.

is there any solution so that my array:

tempArray[]= {0xaa,0xbb,0xcc,0xdd,0xee,0x1a,0x2b,0xff,0x99,0x55}.

need to store values from .text file into specific location of array USING C language?

Thanking you in anticipation of favorable replies.


[ Edited Thu Apr 21 2016, 01:27 pm ]
Thu Apr 21 2016, 02:36 pm
#2
Hello,

Did you worked on the solution .. Modified it.. as i previous reply.?

--
Karan
Thu Apr 21 2016, 02:46 pm
#3
yes but not copy this value in array properly...
Thu Apr 21 2016, 02:47 pm
#4
Which Complier you are using ? Which MCU ?
Fri Apr 22 2016, 10:09 am
#5
gcc and this code for desktop only...
Fri Apr 22 2016, 11:46 am
#6
in my previous thread i was try your solution but not work for integer now i want to try on hex values only
Fri Apr 22 2016, 12:02 pm
#7
is any solution on hex value data for read and store??
Thu Apr 28 2016, 06:42 am
#8
Did you read / understand my last post to your other thread ?
http://www.8051projects.net/t64923-p10/project-help/read-contents-file-store-in-array.htm


[ Edited Fri May 06 2016, 04:22 pm ]

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

AngeloFoown
Sat Apr 13 2024, 12:17 pm
JamesLex
Sat Apr 13 2024, 05:23 am
RobertWah
Fri Apr 12 2024, 08:01 pm
solar_qcor
Fri Apr 12 2024, 08:38 am
Rosalvascuth
Thu Apr 11 2024, 06:07 am
WilliamAmazy
Wed Apr 10 2024, 10:13 pm
slm_pkPn
Wed Apr 10 2024, 08:43 pm
LaurenBramn
Wed Apr 10 2024, 02:08 pm