Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strings in C - help
10-05-2012, 11:30 PM,
#8
RE: Strings in C - help
You can do this manually to see if the problem is due to strcat:

- Use strlen to know the length of the source string ( or even scan the string until \0 is found )
- Move a pointer on the destination string until \0 is found
- transfer from source to destination ( byte by byte )
- write a \0 in the destination string when transfer is finished

\0 ( \zero ) is the end string delimiter for C langage.




(10-05-2012, 10:45 PM)KiloOne Wrote: Oh darnConfused

I will keep looking at this, nice to know you have issues too, maybe it is strcat() issues.

Dale

So, I removed the CDC usage in my main code and execution still halts in the section where I use strcat() to assemble a long string (130 bytes right now) of comma delimited values that I am trying to write to the SD every second.

If I limit the number of values I save so that the string is about 68 bytes or less the program functions and saves the data.

As you can see, I use sprintf to format a value and then strcat to add it to the string. Is there another way I can assemble my values into a string?

Dale
Reply


Messages In This Thread
Strings in C - help - by KiloOne - 10-05-2012, 09:24 PM
RE: Strings in C - help - by mf01 - 10-05-2012, 10:00 PM
RE: Strings in C - help - by KiloOne - 10-05-2012, 10:30 PM
RE: Strings in C - help - by KiloOne - 10-05-2012, 10:06 PM
RE: Strings in C - help - by jpmandon - 10-05-2012, 10:18 PM
RE: Strings in C - help - by mf01 - 10-05-2012, 10:43 PM
RE: Strings in C - help - by KiloOne - 10-05-2012, 10:45 PM
RE: Strings in C - help - by jpmandon - 10-05-2012, 11:30 PM
RE: Strings in C - help - by mf01 - 10-05-2012, 11:32 PM
RE: Strings in C - help - by moreno - 11-05-2012, 06:59 AM
RE: Strings in C - help - by mf01 - 11-05-2012, 09:10 AM
RE: Strings in C - help - by KiloOne - 11-05-2012, 01:38 PM
RE: Strings in C - help - by pingotg - 11-05-2012, 02:46 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 03:08 PM
RE: Strings in C - help - by mf01 - 11-05-2012, 03:08 PM
RE: Strings in C - help - by pingotg - 11-05-2012, 03:27 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 03:53 PM
RE: Strings in C - help - by pingotg - 11-05-2012, 07:19 PM
RE: Strings in C - help - by mf01 - 11-05-2012, 03:47 PM
RE: Strings in C - help - by mf01 - 11-05-2012, 03:57 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 04:23 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 08:33 PM
RE: Strings in C - help - by moreno - 11-05-2012, 08:53 PM
RE: Strings in C - help - by KiloOne - 13-05-2012, 12:34 AM
RE: Strings in C - help - by pingotg - 11-05-2012, 08:58 PM
RE: Strings in C - help - by KiloOne - 11-05-2012, 09:50 PM
RE: Strings in C - help - by pingotg - 12-05-2012, 09:55 AM
RE: Strings in C - help - by moreno - 12-05-2012, 07:45 AM
RE: Strings in C - help - by KiloOne - 12-05-2012, 03:31 PM
RE: Strings in C - help - by pingotg - 12-05-2012, 05:22 PM
RE: Strings in C - help - by KiloOne - 12-05-2012, 05:40 PM
RE: Strings in C - help - by pingotg - 12-05-2012, 06:11 PM
RE: Strings in C - help - by KiloOne - 12-05-2012, 07:27 PM
RE: Strings in C - help - by pingotg - 13-05-2012, 04:48 PM
RE: Strings in C - help - by bjoernp - 15-05-2012, 05:42 PM
RE: Strings in C - help - by KiloOne - 17-05-2012, 12:09 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)