THIS IS AMAZING! THANKS PLEASE MAKE MORE VIDEOS LIKE THIS!
@airplanefreak2711 жыл бұрын
This is EXTREMELY helpful!
@ReelLearning12 жыл бұрын
In general you should declare variables in the narrowest scope as possible - I don't always follow this rule myself, but I did in this case. A good compiler will not produce anymore overhead for declaring the num variable inside the loop. As far as using a try/catch, you may be right... I don't remember my thought process at the time, but maybe I planned to do a separate video on exceptions and the try/catch.
@AbdelrahmanRashed8 жыл бұрын
Thanks , your program really helped me in writing on my Android Calculator , Thanks again man.
@dbf80145 жыл бұрын
when you just compiled the program what happens if i wanna do 1.2 - (subtract) 2.9 q (quit) ???
@LukusGames3 жыл бұрын
What a fantastic video
@_ZeRoYa_6 жыл бұрын
Thank you very much for a great video and your clear explanation!
@georgepatsias9 жыл бұрын
Very helpful!!! Thanks very MUCH!
@EmZvr11 жыл бұрын
Very good explanation, thank you.
@Shockszzbyyous9 жыл бұрын
so every time isOperator is called the string will be allocated space and the symbols loaded? or is the compiler smart enough to see that and just load it once outside the scope of the program and just use a pointer for it ? or am i totally getting it wrong here :D
@thinkb4uclick_7806 жыл бұрын
thank you for this vid! it helps alot 😊
@badpeq11 жыл бұрын
This helped a lot, thanks!
@RootForums6 жыл бұрын
You sound like Bill Gates... Thank you for the tutorial !!
@danielmejia40542 жыл бұрын
Sooo good
@rady9010 жыл бұрын
What if you divide by zero? Goodbye processor?
@jamesbones16686 жыл бұрын
outstanding. thanks.
@kim157428 жыл бұрын
Is there no other way of translating the operator char into an actual operator? I have those long else if stacks...
@aggbak17 жыл бұрын
use a map that has a string for a key and a pointer to a function with two doubles as arguments and returns a double.
@shojibmahmud96677 жыл бұрын
If I want to do some operations with Trigonometric operators then what should to do?
@andeluuledna9 жыл бұрын
thanks a lot!
@insect21210 жыл бұрын
Why use stack instead of vector? Vector gets better performance.
@jpkfox10 жыл бұрын
Performance does not need to be considered here as the number of calculations is small and is human driven program. Trimming programs is normally not needed until there is a real need for it. Makes code better structured by using stack I would say. So I think I would also use stack.
@insect21210 жыл бұрын
jpkfox Ah I see.
@jpkfox10 жыл бұрын
Brock X Because the argument could be set also that making the program even faster we could add some assembly code in it instead of C++ code. Yes it would be even faster, but it would be harder to read for programmers. And that is the whole purpose of C++: to make code better structured and more readable. Sometimes it means a bit worse performance, but we sacrifice it a bit sometimes to get better looking code. But again it depends.. if performance was really needed, then yes we would need to trim it and do it even if the code looks less structured.
@insect21210 жыл бұрын
jpkfox I'm glad I chose to use vectors then. I am making a program that requires millions of calculations, so performance is important.
@jpkfox10 жыл бұрын
Brock X Yes sure if its millions of operations per second, then must read the documentation and check which is fastest. But with this calculator its not the case... its only couple of operations per second required.
@TheWeepingCorpse9 жыл бұрын
why do you say pound include instead of hash include. # = hash, £ = pound.
@Witteplaag7 жыл бұрын
Can't be certain, but I believe it's an American thing. I knew "#" all my life as "pound" until twitter came along.
@TheBoomersauce6 жыл бұрын
Americans dont have £ on our keyboards so we can call # pound without a name conflict. As to why we call it pound i think it has something to do with telephones
@sirkastic6 жыл бұрын
Because we aren't all British Wankers
@kevinozocak43497 жыл бұрын
how can i change the programm to use also e function ? example: 3e-2... ?
@MegaBdboy7 жыл бұрын
How can i transform this code in prefix polish notation not revers ?
@majesticbarrack55068 жыл бұрын
is it works on variables?
@irvansuryadi36406 жыл бұрын
may i get the codde
@matusivanovic599210 жыл бұрын
heya i wrote EVRYTHIN like in dis wideo, and 5 4 + printed out 1.25 WOOOT