M
mescaline
Hi I have the following doubt about header files --
I have the foll. 3 files in a folder.
File 1: one.cpp
#include <hel.h>
#include <iostream>
using namespace std;
int main(){
hello();
return 0;
}
File 2: hel.h
#ifndef HEL_H
#define
void hello();
#endif
File 3: hel.cpp
#include <hel.h>
void hello(){
cout << "Hello" << endl;
}
--------------
I just need the output Hello using this header file formatting. I have
these three files in a folder. How should I compile these three files
using g++? WHen I just try g++ one.cpp, I get the output: hel.h: No
such file or directory
Thanks
m
I have the foll. 3 files in a folder.
File 1: one.cpp
#include <hel.h>
#include <iostream>
using namespace std;
int main(){
hello();
return 0;
}
File 2: hel.h
#ifndef HEL_H
#define
void hello();
#endif
File 3: hel.cpp
#include <hel.h>
void hello(){
cout << "Hello" << endl;
}
--------------
I just need the output Hello using this header file formatting. I have
these three files in a folder. How should I compile these three files
using g++? WHen I just try g++ one.cpp, I get the output: hel.h: No
such file or directory
Thanks
m