Halo to game you learn how to convert strings to numbers so tender is far from the resource section
0 3 convert string to num zip and put it in your face and projects there and then unzip it
and now you can give it a zip file.
And open the file and inside it.
Here we see a new program called convert string to NUM has an So let's open it and that is running first
to study the behavior run and compile
and now open your project for the income on from and then never get to use a tree so we'll copy this
tree 10 see to frankly base the path and enter type Yeah.
And if you see the ECF ha.
So that is funny.
PRESENTER Any ask you to enter a number.
So in um in turn number they say to.
Presenter.
And he returns three.
He ran again into an unknown number.
Presenter and he returns.
Seventy nine.
So this programme takes.
Uh no.
We should enter Congo into a number and then increases it by 1.
Remember that whatever you enter here is a string.
And that's why you need to convert it into a number before you can perform any kind of dramatic operation
so let's see how he's done.
So include unnecessary lines for every program and gave me specify the size of the input maximum assisting
base.
And here we have the string to ask the user to enter a number and the output string in this format.
However this time we have a different format specify a presentation D the essential integer number.
So and digit which means Integer 0 number and then we have the usual variables for you Windows API functions.
And here is our code stats.
So this is a prince the message enter number.
So he pushes the string to this day there are no name printed.
So we get this problem into a number.
After that he gets the handle.
The input handler which is referring to the command line and using Rand is being used by the refile
as usual in the previous lessons.
We have seen this.
So now you receive whatever you input.
For example you leave with seven year.
It starts in this year it puts.
Interesting is the UK here.
It's a variable
next he converted into a number.
So this is the new function call string to unsigned long long here means there being no long integer
unsigned means return.
Negative values but even though we were here with 18 values we can still enter negative numbers.
He was to look straight.
If I enter 85 here is to increase it by 1 and even negative for
so this function string to say long times from the Microsoft.
We should see runtime library so we included here.
Since you were a struggling and if his barometer here is the base.
So in this case we want to input you and convert is number the string into a base then based in number
and find a living as 0.
Now trying to unsigned long takes the input string which is the number you enter here.
The string and in Congress in based in and the result is starting e x.
So in the next line you get there is up here it's just the numeric value of the string.
In this case Sony converted into a number Sony and then started a variable call number which you declare
here
under you start the number in this variable code number.
You can now increase the number by 1.
So this is an automatic operation.
I see an increase means to add 1 to the value stored in this address.
So this is how you increase it.
So whatever number one ever starting here will not be incremented by 1 and the rest is the same as before.
You now calling the print function to print the number.
So the first perimeter of the print.
Is the the string and you want to print.
And the second parameter is a number that you want to insert inside the string.
Oh here.
Presentation the percentage dy is the second barometer which is a number.
So now you come to the next line you see the process.
So this is how the program works.
So I do feel free to experiment with this to modify the POV on other kinds of calculation to getting
a grasp of how the conversion of the string looks.
So that's a modest lesson.
Thank you.
Highlighting.