I am trying to create an "all inclusive" header so i only need to type #include "all.h" at the beginning of a program
As I am still learning, i only have three things in all.h atm which include:
ifndef ALL_H
define ALL_H
#include <iostream>
#include "stdafx.h"
#include <cstdlib>
endif
and in my main project i have:
#include "all.h"
int main()
{
//code
}
but when i try to compile the program i get this error:
d:\c++ projects\helloworld\helloworld\helloworld.cpp(1) : warning C4627: '#include "all.h"': skipped when looking for precompiled header use
Add directive to 'stdafx.h' or rebuild precompiled header
d:\c++ projects\helloworld\helloworld\helloworld.cpp(12) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
it is a short file... and line 12 would be directly after the } ending the main() but nothing is there.
So, I am asking if I have my header setup right, and is it even possible to do what I am trying to do?