0

I was reading through some C++ code, and I noticed if(;;).
I've tried to Google it and even search on here, but it seems to ignore the brackets in searches. Obviously I know what an if statement is, but what do the ;; mean inside the brackets?

EDIT: nevermind, as NardCake said, it was actually for(;;). Was tired and saw it last night and totally forgot. My bad.

Edited by FriXionX

2
Contributors
3
Replies
22
Views
3 Years
Discussion Span
Last Post by NardCake
1

I've never seen it before the only thing I've seen similar to that is for(;;) which is essentially an infinite loop, so my best guess is it's an always true if statement for some reason? Have you tested it to see what it does?

0

Oh, it possibly might be for(;;). I saw it yesterday about 20 hours ago from now so maybe I forgot. I'm going to double check, i'll come back to edit this post soon

edit: Yeah, it was for(;;). My bad. thanks for the explanation too

Edited by FriXionX

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.