i sure understand that and agree with you, as my good friend said that most of the time it is better to be a nice "read-able code" then to be "to-safe code".
coz surely will need to be...
Type: Posts; User: Flo
i sure understand that and agree with you, as my good friend said that most of the time it is better to be a nice "read-able code" then to be "to-safe code".
coz surely will need to be...
and if u want to remember and understand better u could also answer on forums and explain why u said that and that, and document if its true what you say (for refresh your memory and to be sure its...
or more explicit to say .. is that metod is worth using when one of the conditions to be evealuated depends on the other one or when u want/expect a short-circuit.(if u dont trust the order in wich...
Elysia didnt u posted before grumpy ?(if not, i think my eyes are kinda playing triks on me .. ).
From what i see (and i read here and there) no real diference or inpact if i use first style or 2nd...
is there any real reason why some prefer one style over another whyle using them ? :
if (col == 1)
cout << '*';
else {
if (col == height * 2)
...
now that i can understand with ease, ty ty :)
/edit
and nvm about the other thing that i was thinking ..
#include <iostream>
using namespace std;
int main()
{
for ( ; ; )
{
char inputforcase = 0;
cin>> inputforcase;
char this = 0;
cin>> this;
cin.ignore ( this, '\n' );
1. cin.ignore(this,'\n') checks "this" to find first '\0'(null character) and ignore everyting
after that, in adition ignores '\n'(new...
well i used "struct" keyword coz i get color blue on it and its easy to spot in code , so in small code were i mostly know what ive done that was a good ideea to spot but for long term that could do...
"struct" keyword i know, but its not wrong to let it there .. im new to coding so i let it be there to know what,were i done . coz that was an exercise to learn how to use structs.
yup ur right, i didnt read it right, and so i missed that var is from obj so if obj is null that means var doesent exist . my bad again .
If "tricks" are so useles and so wrong then how about...
ofcourse is not legal && didnt have with what to compare to. my bad .
i gues this should be legal :D
if ( ( ( obj != NULL ) && obj->var ) != 0 )
{
...
}\
from what i read in Tutorials and im learning rignt now, this is how Boleans priority are .
see here and u can use "()"
eg.:
if ( ( ( ( obj != NULL ) && ) obj->var != 0 ) )
{
...
}\
its...
got it ! :)
ty ty
im trying to understand why im forced to use 'cin.ignore();' in my example code
and why when i run it without 'cin.ignore();' it jumps a bit to far in my code .
its kinda anoying to not know. :D ,...