Thread: strcat error
View Single Post
  #1   Spotlight this post!  
Unread 13-03-2009, 15:27
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
strcat error

testing out some code, our auto looked similar to this:
Code:
 int loop=0;
while (IsAuto())
{
     char * name = strcat((char*)(++loop), " iteration");
     printf(name);
}
and I run kernel task, downloads, open console, see nothing, on ds, auto enable, and the console prints out nothing and the ds then says no comms. the RSL was solid, but we had to restart. the strcat seems to be crashing the robot, is this possible? and why?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote