View Single Post
  #66 (permalink)  
Old 25th August, 2005, 06:58 PM
skool h8r's Avatar
skool h8r skool h8r is offline
Member
 
Join Date: January 2005
Location: Rotherham, UK
Posts: 3,157
Send a message via MSN to skool h8r

Right, i'm having problems with 'else' statements. here's what i've got so far:

Code:
if( "%s" == "scott");
printf( "You have the same name as the programmer of this application!\n");
	else
printf("welcome %s.\n", this_is_a_string);
The compiler is saying that else is an unrecognised statement and that on the last line, there's a missing semicolon before 'printf'. I know how to solve the semicolon problem but i have never seen a semicolon at the start of an expression, is it right? If i put it after the else, it's ok but the other error still occurs.
__________________
i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3
Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset

YouTube - Benchmark Results (Coming Soon!)

Last edited by skool h8r; 25th August, 2005 at 07:11 PM.
Reply With Quote