Hi, please have a look at this code. Code: class A { public: explicit A(int); }; main() { A obj=8; } While compiling i am getting error "Type name expected" at "explicit" keyword. What could be the possible reason and its solution? Thanks
Certainly not an ancient compiler that was actually coded by a dinosaur, that's for certain. You will need to use a modern compiler if you want to use modern languages. gcc does a good job of keeping up with the times, or you could use the Microsoft compilers (downloadable for free from MSDN).
I have Visual Studio 2008. But i don't know how to create C++ application on them.Can you guide? Thanks,
It's really not hard. File -> New -> Project; in Project Types pick Win32 under Visual C++. What happens next depends on what kind of project you want. Given that your ability is such that you can't find File New Project, I suggest starting with the template Win32 Console Application. Give it a name and location, it will create a basic project that you can build and run (maybe after adding a line to display Hello World) using the cunningly named menu Build -> Build Solution. After building, fix any compile errors, then use the menu Debug -> Start Without Debugging to run the program.