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.

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?

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

No problem hermano.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.