That's it! I had i++ before do-while while statement that checked for *(number+i)!='\n' but whenever the loop reached \n it replaced it with \0 then incremented i and checked whether next character...
Type: Posts; User: merike
That's it! I had i++ before do-while while statement that checked for *(number+i)!='\n' but whenever the loop reached \n it replaced it with \0 then incremented i and checked whether next character...
I probably should have explained better. What I meant with "it doesn't work" was that when I simply run it, then it won't go any further than this check, but it doesn't hang either.
When I compile...
I wanted to use:
if((*(number+i)=='\n'))
number being declared as char number[15].
It doesn't work though and I can't understand why.
Using:
if((*(number+i)-'\n'))
works but it doesn't do...
I'm reading a file to get some times into array. During debugging I found that pointer value is correct at the moment when I want to save it, meaning it is something xx:xx, x-es being numbers.
I'm...
I'm trying to read in values with one function and then do a simple calculation and print the result using second function. In the end the program is going to be more complicated but that's what I...