Re: #include, loading, and c++
Re: #include, loading, and c++
- Subject: Re: #include, loading, and c++
- From: Sam Miller <email@hidden>
- Date: Fri, 31 Mar 2006 10:28:13 -0600
On Mar 31, 2006, at 9:38 AM, email@hidden wrote:
************ main ***********
#include <cstdlib>
#include <fstream>
#include <iostream>
using namespace std;
#include "randomChar.cpp"
As a general rule of thumb, I prefer only to include header files
using the #include directive. If your intent was to have everything
in the same translation unit, using the include directive to include
extra implementation code only masks that intent in my opinion.
As Justin mentioned, I compiled your second example without any
trouble. What is the error message Xcode gives you?
Sam Miller
Graduate Research Assistant
Department of Electrical and Computer Engineering
Iowa State University
312 Wilhelm Hall
Ames Laboratory US D.O.E. (515) 294-2148
Ames, IA - 50011 email@hidden
http://www.scl.ameslab.gov/~samm/
"If you lie to the compiler it will get its revenge." - Henry Spencer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden