while(a->next)
Would this loop break when a->next is null?
Sorry i've only really done java before, not really sure how while loops work in C.





| Blogs > Steelflight-Rx |
|
Steelflight-Rx
United States1389 Posts
while(a->next) Would this loop break when a->next is null? Sorry i've only really done java before, not really sure how while loops work in C. ![]() ![]() ![]() ![]() ![]() | ||
|
R1CH
Netherlands10342 Posts
| ||
|
IzzyCraft
United States4487 Posts
Or a is a int/double/long double and you input a character, but you can prevent that from breaking by use a ignore command err umm. cin >> a; if( !cin) { cin.clear(); //cin.ignore(); cin.ignore(100, '\n'); } But if your just incrementing a or something i doubt it would break normally =p ionno im very limited c knowlege T_T | ||
|
R1CH
Netherlands10342 Posts
| ||
|
Steelflight-Rx
United States1389 Posts
thanks for the help | ||
|
R1CH
Netherlands10342 Posts
| ||
| ||
StarCraft 2 RotterdaM StarCraft: Brood WarByuN TKL IndyStarCraft SteadfastSC UpATreeSC ZombieGrub68 RushiSC JuggernautJason0 Calm Dota 2Shuttle BeSt Soma Soulkey ggaemo Larva Dewaltoss Terrorterran League of Legends Counter-Strike Super Smash Bros Heroes of the Storm Other Games Grubby2696 Liquid`RaSZi1885 FrodaN1367 singsing1141 Beastyqt682 ceh9514 ArmadaUGS135 uThermal113 ToD112 Livibee108 Mew2King49 BRAT_OK Trikslyr45 MindelVK3 |
|
Afreeca Starleague
Sharp vs Shinee
Action vs Shine
GSL
PiGosaur Cup
Replay Cast
Afreeca Starleague
BeSt vs Paralyze
Jaedong vs Speed
Kung Fu Cup
Replay Cast
The PondCast
KCM Race Survival
Replay Cast
[ Show More ] PiG Sty Festival
CranKy Ducklings
PiG Sty Festival
Sparkling Tuna Cup
PiG Sty Festival
The Patches Monday
|
|
|