Hello everyone, its my first year at university and its been 6 weeks since i have been studying C and C++. I have learnt the basics up till now like how to print an integer ,character, float, int, and opeartors, if,else,while and so on. Anyways, in a few days i will be having my first exam regarding this subject and to prepare for the exam i have installed Microsoft visual studio 2005 on my laptop which is a dell inspiron (windows 7). After a lot of struggle i managed to install it properly and figured out the correct settings.It was working quite well until recently i got interrupted by an error while i was trying to scan a number ,
Example:
#include<iostream>
void main()
{
int a;
scanf ("%d".&a);
system ("PAUSE");
}
After writing this program , i built it ,and got the following 2 errors,
Error 2 error C2228: left of '.system' must have class/struct/union
Error 1 error C2059: syntax error : '&'
My project settings are the following:
empty project
character set -multi byte
Can someone please clarify the mistake i made in writing the program or in the setting? Morever,could you please tell me the syntax differences between visual c++ 6.0 and microsoft visual studio 2005? (is the syntax used for scanf in visual c++6.0 different from mstd2005)
Thank you !