I'm trying to figure out why VS2012 doesn't show the function multi from functions.cpp @ main.cpp. in order to get it displayed in main.cpp I have to type int multi(); in main.cpp.
Here's 2 screenshots, the first screenshots is with int multi();
in main.cpp
the second one is without. The code runs fine in 2 of the cases, but when I want to navigate to multi
function in main.cpp file, I can't do it if I don't type int multi();
@ main.cpp
Can someone please explain me what I'm doing wrong ?
Thank you.
Example image 1
Example image 2
Here's my code
Main.cpp
#include "Header.h"
#include <iostream>
using namespace std;
int plus();
int main()
{
cout << "Eneter a number you want to multiply" << endl;
cout << multi() <<endl;
cout << randomNumber << endl;
system("pause");
return 0;
}
Header.h
#ifndef _HEADER_
#define _HEADER_
#include <iostream>
int randomNumber = 4;
int multi ();
#endif
functions.cpp
#ifndef _HEADER_
#define _HEADER_
#include <iostream>
using namespace std;
int multi()
{
int x;
cin >> x;
return(x=x+x);
}
#endif