This topic is now archived and is closed to further replies.

if loop error

This topic is 5968 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When i put an IF loop in one of my programs it always comes up with an error. The error says "error C2181: illegal else without matching if." I dont understand this because i do have an if statement. char c; cin>>c; { if(c==''1'') return 0; else cout<<"Hello"<

Share this post

Link to post
Share on other sites