trying to use forward declaration
I am trying to declare a vector pointer, and an ifstream pointer in a class that I plan to use to read binary files. I have heard from someone that using #include in header is often not best (not sure why), that it is better to use "class <name>", and then in the *.cpp file do the #include <name> call.
I have tried doing that in my code but it doesn't work. I have tried this with some qt classes before and it works.
I get this error:
// #include <vector>
// #include <fstream>
g++ -c -Wall main.cpp -o main.o
error: 'vector' is not a template
error: 'uint32_t' was not declared in this scope
error: 'vector' in namespace 'std' does not name a type
error: 'fstream' in namespace 'std' does not name a type
error: 'uint32_t' does not name a type
error: using-declaration for non-member at class scope
error: expected ';' before '*' token
make: *** [main.o] Error 1