Hello Experts,
I am newbie in C++ (code blocks too).
I am calling one function (funSay) from input.cpp file to main.cpp file, but it won't run because of undefined reference error.
Kindly refer image for actual code and error message
main.cpp
#include <iostream> // helps with input and out put related tasks
#include <limits> // helps to use max and min functions
#include <ctime> // helps to use time functions
#include <time.h> // help with time functions
#include "myhead.h"
using std::time_t;
using std::time;
using std::localtime;
using std::asctime;
using namespace std; // helps to use cout and cin
void funSay();
void funinput();
void funVariable();
void funTime();
int main()
{
cout << "Hello world!" << endl;
funSay(); // calls function named funVariable
return 0;
}
input.cpp
void funSay()
{
cout << "from another file" << endl;
}
myhead.h
#ifndef _MYHEAD_H
#define _MYHEAD_H
void funSay();
#endif
Second, how do i upload image, code, quote in forum text.
Clicking on given options only seems to add [img] kind of text only.
Even when my post shows 0 count, I still get error message
"You already submitted this post! You might have accidently double clicked, or tried to refresh."
:'(
With regards : Msinfo