hi
i have just installed a the visual studio software
and would like to write a simple C++ program as i am a beginner but there is an error and won’t let me compile.
ERROR MSG: CAN NOT COMPILE FILE NO COMPILE TOOL IS ASSOCIATED WITH THE FILE EXTENSION???
DO I HAVE TO DOWNLOAD IOSTREAM.H FROM SOMEWHERE AND IF SO WHERE???
My code looks like:
#include <iostream.h> // tells the compiler to include input/output stream file
//this is a C++ program. It will print a msg on the computer screen
No, there is nothing you need to download for the example you have shown.
Originally posted by catalanoli:
[b]hi
i have just installed a the visual studio software
and would like to write a simple C++ program as i am a beginner but there is an error and won’t let me compile.
ERROR MSG: CAN NOT COMPILE FILE NO COMPILE TOOL IS ASSOCIATED WITH THE FILE EXTENSION???
DO I HAVE TO DOWNLOAD IOSTREAM.H FROM SOMEWHERE AND IF SO WHERE???
My code looks like:
#include <iostream.h> // tells the compiler to include input/output stream file
//this is a C++ program. It will print a msg on the computer screen
You have to have the extension .cpp/.cc for C++ files and .c for C files. If you try to compile a .c file with g++ for example the gcc will go in and compile the file anyway and you got truble if you are using C++ specific commands like (free,new etc…).
The file name must the correct for each compiler.