Code:Im new to C++ programming
Im using Visual C++2008.. this is my program..
#include "stdafx.h"
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include<limits>
void main()
int option =3;
switch (option)
{
case 1:cout<<"one";
break;
case 2:cout<<"two";
break;
case 3:cout<< "three";
break;
default: cout<<"no value";
system("pause");
}
.... but it doesnt work :( These errors comes... I wanna know why
Error 1 error C2144: syntax error : 'int' should be preceded by ';'
Error 2 error C2059: syntax error : 'switch'
Error 3 error C2143: syntax error : missing ';' before '{'
Error 4 error C2447: '{' : missing function header (old-style formal list?)
do I need to include another header file?? please tell me whats wrong :( I have no clue :(