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

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am