Can anyone expand on why you get this error?
Acidburn
0
Posting Pro
Recommended Answers
Jump to PostYou have this kind of statement
if () .......... else .......... else ........
in your code?
Jump to Postif you have more than one statement in the if/else block you need braces ( { } )
{ toss = 1 + rand() % 2; if(toss == 1 ) { cout << "Heads" << endl; passes = passes +2; } else { cout << "Tails" << …
Jump to PostYou really should sort out a line spacing convention, that just looks horrible.
if{a==1) printf(); else if(a==2) print(); else //do something here otherwise it'll fail.
All 10 Replies
frrossk
2
Posting Whiz in Training
Acidburn
0
Posting Pro
1o0oBhP
4
Posting Pro in Training
harshchandra
-3
Junior Poster in Training
the b
0
Light Poster
the b
0
Light Poster
teoh
0
Newbie Poster
kirennian
0
Light Poster
prvnkmr449
-8
Junior Poster
CezarPt
0
Newbie Poster
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.