This might be a little bit off group but I wanted to learn to work with
make in linux so I write this makefile
main: main.cpp ./EscribeHolaMundo.cpp ./EscribeHolaMundo.H
g++ -I. main.cpp ./EscribeHolaMundo.cpp -o main
with
EscribeHolaMundo.cpp
#include <iostream>
void EscribeHolaMundo() {
cout << "Hola Mundo";
}
and
main.cpp
#include <EscribeHolaMundo.H>
int main(int argc, char *argv[]) {
EscribeHolaMundo();
}
now, with this, make doesn't recognize cout
../EscribeHolaMundo.cpp:4: error: `cout' undeclared (first use this
function)
but if I use the old c sintaxis with <iostream.h>, then g++ produces
its warning about the deprecated headers but works. Can somebody tell
me why it doesn't work with <iostream>?
Daniel