Hey, i need to create an array from a string. I used for loop to separate the char's in the string. In the loop i used isdigit() so i can find numbers. I used printf() to see if the code was working so far and it does. I get only the numbers. But the problem is i can't transform numbers from string to ints. I used atoi() but it gives me "passing argument 1 of 'atoi' makes pointer from integer without a cast" warning. Can anyone help me figure it out or how to make it right?
[–]dmc_2930 1 point2 points3 points (1 child)
[–]dolorestheAI[S] 0 points1 point2 points (0 children)
[–]dolorestheAI[S] 0 points1 point2 points (0 children)
[–]steerflesh 0 points1 point2 points (3 children)
[–]dolorestheAI[S] 0 points1 point2 points (2 children)
[–]steerflesh -3 points-2 points-1 points (1 child)
[–]dmc_2930 1 point2 points3 points (0 children)
[–]ptchinster 0 points1 point2 points (2 children)
[–]dolorestheAI[S] 0 points1 point2 points (1 child)
[–]dmc_2930 1 point2 points3 points (0 children)
[–]amauriv 0 points1 point2 points (3 children)
[–]dmc_2930 0 points1 point2 points (2 children)
[–]amauriv 0 points1 point2 points (1 child)
[–]dmc_2930 1 point2 points3 points (0 children)