I wanted to use a function which I have defined on file h3.cpp in main.cpp for which I created a file h3.h and declared that particular function in the header file. but my file h3.cpp is not getting compiled and showing error--
undefined reference to `WinMain@16'--
//main.cpp
#include<iostream>
#include"h3.h"
using namespace std;
int main(){
intlog();
log("hello");
return 0;
}
//h3.cpp
#include<iostream>
#include"h3.h"
void log(const char* message){
std::cout<<message<<std::endl;
}
void intlog(){
log("world");
}
//h3.h(HEADER FILE)
#pragma once
#include<iostream>
void log(const char* message);
void intlog();