1
I’m having trouble showing off some printf
, for example:
printf("\nDigite as horas : %d");
And at the time of displaying the message, it appears with a number on the side, for example:
Enter the hours: 89676
What’s the mistake in that? I declare the correct variables, but in the display appears this number, what can I do to take them out?
Probably it is reading some invalid memory region, since you specified that you would pass a number as argument (
%d
) but no pass (example - note that a different number has been displayed as the content of the memory at that point is undefined). If you doprintf("\nDigite as horas : %d", 10);
he will printDigite as horas: 10
. If you don’t want any number, remove the%d
and it will printDigite as horas:
.– mgibsonbr
Thank you Renan, but I’ve taken the %d of the question that I’m asking and it’s still the same :/
– Karolayne Santos
I suggest [Dit] the question putting more of your real code, because only with this example is it difficult to know what is really happening...
– mgibsonbr
@Karolaynesantos Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? Need something to be improved?
– Maniero