Sai Meghana
now im surprised 49 test cases passed.
Anonymous
num = 42; // initialization
Sai Meghana
wow, intialization did the trick. everything passed :D
Anonymous
int num = 42; // declared and initialized
Anonymous
It can be 0 it can be 194472
When I was learning, I used to do this mistake once I forgot to initialize my vars to 0 and scratched my head for hours.
Anonymous
Good catch
Anonymous
@K11M1 congratulations
klimi
Yay
Sai Meghana
klimi
Maybe the first time I did something good in this group tbh
Nikolas
Bro your locals are damn uninitialized
it was actually pointed out by him first 😆
Anonymous
Maybe the first time I did something good in this group tbh
You did it before too. Anyway congrats😃
Sai Meghana
I guess I took that for granted. I mean I did think about intitializing but then I thought, Hey If thats the problem how did 49 cases pass
Anonymous
Sai Meghana
What are CTFS?🙈
Anonymous
hai
Anonymous
/strat
Anonymous
😐 aren't you a Bot?
Anonymous
🤔
Heya! What are you studying about?
Nameful
Heya! What are you studying about?
Currently I'm studying how to implement MVC in PHP
Anonymous
rly
Not able to download.. 🙁 Whatsapp is down as well
Anonymous
rly
😂😂 yeah ik it's a bot.. i was just kidding
Anonymous
Currently I'm studying how to implement MVC in PHP
Ohh I'm currently studying STL in CPP
Anonymous
WhatsApp?¿?
Yeah? Whatsapp messenger?? Like i cant download anything or can't view statuses for last 2 hours.. I could only send media files, can't download
Anonymous
🤔 soo. What does it means?
void
We're in Telegram right now..🤔
Anonymous
We're in Telegram right now..🤔
Yeah that's why rn im using telegram
Anonymous
#ot time
Ohh thanks.. i didnt know bout it
sushma
ok
Dima
/ban bitly link
Dima
Anonymous
/
Mihail
i thought declaration meant intialization to zero?
Only the case for global variables
Mat
No screen photos
Dima
Meh I am late
Anonymous
Anonymous
Help remove the bug
I_Interface
Victor D.
Just make sure your are not ending statements with the greek question mark 😂
I_Interface
Dima
Dima
1. You need to read age property using cin or fscanf 2. no screen photos
Anonymous
Want to print the string "you are very old ..." When age is past MAX but not showing, what could be the problem
Dima
put cin >> age; before if (…
I_Interface
What's better for u: std::endl or "\n" ?
Victor D.
put cin >> age; before if (…
Munene 👆🏽your are not reading into age dude
Dima
I_Interface
\n for sure, or endl in the end
Jason Turner said, what need to avoid std::endl as possible)
Dima
he has age uninitialized
Dima
Jason Turner said, what need to avoid std::endl as possible)
that’s what I said, if I would use it, I would use it in the scope end
Dima
endl just flushes a buffer
Dima
I like \n\n\n\n
Dima
here \n\n\n\n\n you dropped
Nameful
What's better for u: std::endl or "\n" ?
'\n' is probably what you want
Nameful
endl does more than what you want
Nameful
Most of the time
Anonymous
Got it
Stephanos
1) why is there using namespace std? this is not a good point to start programming. 2) define max? what the hell man. setting constant values that should be evaluated during compiletime. that's what constexpr are for. and furthermore: max? seriously? thats not a name. 3) why are you looking into an uninitialized variable? thats not a bug, thats not thinking about what you actually want to do. so: 1) throw out using namespace std and learn where your functions are located in the libs 2) use constexpr instead of macro defs if possible (constexpr int maxAge) consider giving your variables precise names. names matter and expressiveness matters 3) take a pen and some paper and make a graph of your program
Stephanos
Help remove the bug
also writing complete sentences when asking for someones help is usually considered good-practise ;)
Artöm
not ready for constexpr, but for a marco? i really doubt that
Macro vars are very simple and dumb. Nothing to explane but one word - define
Stephanos
a constexpr int maxAge{100}; is also really dumb
Stephanos
i see a lot of senior code with magic number defines in it, and i can tell you... the bugs are exactly there
Artöm
a constexpr int maxAge{100}; is also really dumb
Yeah, then they might do constexpr std::string prefix{ "$HOME/myspace/" };
Stephanos
but constexpr are typesafe, and thats one of the most important features about c++