Message from C, C++ talks

June 2019

β€” TinkuBanna can u look into it

β€” Yes but I don't know

β€” Ok

β€” I thought switch can only take char and int wasn't knowing that it can take stringsπŸ˜…
and
passing null to terminate while loop πŸ™„
thanks for giving your time will try to improve 😁

Message permanent page

β€” 

1) Don't use compile time arrays, they will fill your heap space up.
2) don't read a full line at once, because it will make you do the parsing twice
3) You can do the parsing recursively because you know that if there is something after the second operand, you have a second equation.

do something like this:
a + b

if after b, you have another operation, you evaluate
a + (b + c)

for example

that way, you don't even have to store the numbers, meaning that you will be less likely to fuck up and you won't even have to use the std::vecto

β€” Oh true, missed that. Well then you could replace those with if/else

β€” Would be better

β€” BinaryByter mmihov sry for being intense... Can u help??

β€” >2. You're including headers you don't even need.

Wait, aren't you the guy who thinks that compilers are spotless at optimizing?=

Message permanent page

β€” Ask us what you dont understand, instead of telling us that you don't understand it

β€” No I'm not and even if they were that doesn't mean you should include every header file you've heard of

Message permanent page

β€” Yeah i just told that... Its clear from my question/image that how does scanf works in this case...

β€” Ask EXACTLY what you don't understand

β€” And it won't increase runtime, but would increase compile time

β€” It will increase runtime πŸ˜‰