home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!news.iastate.edu!moharil
- From: moharil@cs.iastate.edu (Vinay Arvind Moharil)
- Subject: Problem with CC 3.0
- Message-ID: <moharil.715318065@judy.cs.iastate.edu>
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames IA
- Date: Tue, 1 Sep 1992 03:27:45 GMT
- Lines: 38
-
- Hi Netters!
- I am new to the world of C++. I am trying to use the CC 3.0 for Sun SPARC.
- Here is the code in C and C++. The code in C can be compiled with the C
- compiler happily without any problems. However when I try to compile the
- C++ code using CC 3.0 I get lot of errors in the files like sys/stat.h,
- X11/Intrinsic.h. I did the extern "C" ... part because some one suggested that
- as a solution to get rid of the syntax errors (in the X11/Intrinsic.h file) I
- was facing. In my opinion, The CC 3.0 should compile the #include portion as a
- C code and should not give errors as is the case with the C compiler.
-
- Please HELP!
- Thanks
- bye
- vinay
-
- main(argc,argv)
- int argc;
- char *argv[];
- {
- #include <X11/Intrinsic.h>
- #include <stdio.h>
- typedef char *String1;
- String1 xyz;
- printf("Hi!\n");
- }
-
- main(argc,argv)
- int argc;
- char *argv[];
- {
- extern "C" {
- #include <X11/Intrinsic.h>
- #include <stdio.h>
- }
- typedef char *String1;
- String1 xyz;
- printf("Hi!\n");
- }
-