|
From: Santiago P. C. <San...@yd...> - 2002-10-10 08:13:19
|
Hi Greg,
You should NOT include a '.cpp' file within another '.cpp' file (this is, of
course, valid for main.cpp also), you should only include "header" files:
'.h'/'.hpp'/'.hxx'/... These are files for class/functions/types/...
definitions, and '.cpp'/'.c' files are for class/functions/...
implementation.
So, I think your problem is that 'apstring' class definition is in
'apstring.h'/'apstring.hpp'/apstring.hxx'/whatever file, but NOT in
'apstring.cpp' file (remember: that file should contain the implementation,
but not the definition).
So you should include the appropriate header file and add the 'apstring.cpp'
file to the project (within Dev-C++ environment).
OTOH, you should:
1st -
Use the line
#include <iostream> // C++ style
Instead of using
#include "iostream.h" // C style for NON-SYSTEM headers
2nd -
Return some value from main function... It is declared as 'int main()'.
Hope this helps,
Santy
-----Original Message-----
From: Gregory Hart [mailto:gr...@fr...]
Sent: jueves, 10 de octubre de 2002 1:29
To: dev...@li...
Subject: [Dev-C++] Apstring
I'm having trouble using apstring in Dev-C++. My code is: #include
"iostream.h" #include "apstring.cpp"
int main ()
{
apstring testString = "test";
if (testString == "test"){
cout << apstring
}
}
I get 6 C:\Dev-Cpp\projects\irs\test.cpp `apstring' undeclared (first use
this function). When I put apsting.cpp into the function, the first error is
the ::. Any suggestions? -Greg
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
|