I want to write simple C ++ code in visual studio 2012, but always get error C1004 in the header file. Can anyone help me out?
My code is below. I am new to C ++ visual studio, so this can be a very stupid mistake.
add.cpp
add.h
#ifndef ADD_H #define ADD_H int add(int a, int b); #endif
source.cpp
#include "add.h" #include <iostream> int main() { std::cout << add(3, 4); return 0; }
source share