well i fixed my problem
i used %.29s flag with printf to limit the number of chars printed and i removed that whole for loop and used
Code:
while (playtime[i]!=0)/* if playtime ==0 then there is no song there*/
{
mins = 0;/* tryint to make it obvious if convert method isnt working*/
secs = 0;/* by initializeing mins and secs or each new song to 0*/
convertSecondsToMinutes(&mins, &secs, playtime[i]);
titles[i][(strlen(titles[i])-1)] = '\0'; /* this is how i found
the newline char and replace
it with null, then i just printed
a newline at the end of my real
printf statemnet*/
if (select[i] == 1)
{
printf("*");/* indicates song is selected*/
}
else
{
printf(" ");/* holds place of * to keep spaceing same*/
}
printf("[%1d]%3d:%02d %.30s\n", i+1, mins, secs, titles[i] );/* prints song info...*/
i++;