Is C++ a superset of C? Can I use a C++ compiler to compile C code?
Infrequently Asked Questions in comp.lang.cC++ is a superset of something, we're not sure what. You can use a C++ compiler to compile C code, but the results may surprise you.
Related QuestionsMiscellaneousC++ was derived from C, and is largely based on it, but there are some legal C constructs which are not legal C++. (Many C programs will nevertheless compile correctly in a C++ environment.) Look for programs (see also question 17.12) named: ...a C cross-reference generator cflow, calls, cscopeRelated Questions
How do I use the SuperSet Menu? What code do I use for my software?
Technical Support - Digitizing & Measurement Products - ...For your convenience the User's Manual contains a list of applications with SuperSet codes. If your particular application isn't listed and you know the output characteristics the software requires, consult the list of SuperSet codes with output characteristics also provided in the User's Manual.
Related QuestionsCan I compile Octave with another C++ compiler?
Frequently asked questions about Octave (with answers)I'm looking for new questions (with answers), better answers, or both. Please send suggestions to bug-octave@bevo.che.wisc.edu. If you have general questions about Octave, or need help for something that is not covered by the Octave manual or the FAQ, please use the help-octave@bevo.che.wisc.edu mailing list. This FAQ is intended to supplement, not replace, the Octave manual.
Related QuestionsWhich compiler should I use and where can I compile my codes?
You should use the Compaq compiler fort to compile both your fortran 77 and fortran 90 programs. C and C++ programs can be compiled with gcc or g++, respecively. To compile and link your MPI programs to the MPI libraries, use mpif77, mpif90, or mpicc. The mpi scripts use fort to compile and link your fortran MPI programs, and gcc or g++ to compile and link your MPI C or C++ programs. You can compile your codes on any machine, and you do not need to submit a job to compile your codes.
Related QuestionsWhy can't I get the C compiler to compile my program?
Grex FAQProbably you are using the wrong C compiler. Grex has two compilers installed. cc is only used for building certain system executables. It is not ANSI standard, and it lacks certain standard include files. You need to use gcc instead. This is a fairly recent version of the Gnu C compiler. It is ANSI standard and very complete.
Related QuestionsI'm using C++ but would prefer to use a different compiler than the one on CEC. Is this possible?
CS 241 Frequently Asked Questions (FAQs)Sure. However, you will be responsible for making any needed modifications to the provided code. The provided IntervalTimer will not work on other platforms since it makes calls into the Unix operating system. You can replace this by whatever system utility you have to get the time. Then by getting the time before and after the algorithm runs you can take their difference to determine the elapsed time. Just be sure that your procedure is the only process running.
Related QuestionsI already have C++ compiler x, can I use it?
FAQYes, but you should compile and run your test cases using the Cygwin/GNU compiler (g++) in the lab before you submit your assignments. If it works there, then it's ok. (Of course we may find test cases for which your program doesn't work on any compiler.) where files is a list of one or more files that the compiler is to compile, and options is one or more of the following. (There are others, these are just the most relevant ones.) Give all warnings.
Related QuestionsWhere can I get the C code of a Modula-2 compiler?
Modula-2 FAQMost Modula-2 compilers are written in Modula-2. It seems rather strange to me that one would want to trust the compilation of a good language to a tool written in a poor one.
Related QuestionsCompiler concepts Q: What is the source code for the compiler?
Code Style: Java compiler frequently asked questions (FAQ)The source code for a Java program is also known as a compilation unit, which contains the code for a top level Java class or interface. A Java compilation unit is usually created in the form of a file with a .java extension and is passed to the compiler as a file path reference. The Java source file naming convention is not a standard specified by the Java language but is a common feature of Java compilers, such as javac, to help locate source code.
Related QuestionsHow do I compile the code under Unix?
Internet Junkbuster Frequently Asked QuestionsIf your operating system is from Sun or HP examine the Makefile and make any changes indicated inside. Copy the sample configuration file (junkbstr.ini, previously called sconfig.txt and other names in earlier releases) to some convenient place such as /usr/local/lib/junkbuster/configfile or whatever you choose. The sample file has all the options commented out. You can remove the # character on any that you want, but it may be better to leave this until later.
Related QuestionsHow do I compile the code under Windows?
Internet Junkbuster Frequently Asked QuestionsA .exe file (binary) is supplied with the source code, but if you prefer to compile it yourself here is the likely procedure. Most of these steps are repeated in our checklist for installation under Windows. First click here to download the zip file called ijb20.zip (~208k), then uncompress and unpack the zip archive using a tool like WinZip. Now the distribution (source and sample files) will be in a folder called ijb20.
Related QuestionsCan I use your Basic compiler program to convert Basic programs into C?
FAQThe compiler only works for a small subset of Basic and produces quite inefficient code. I do not recommend it.
Related QuestionsWhat's a free or cheap C compiler I can use?
Tools and ResourcesA popular and high-quality free C compiler is the FSF's GNU C compiler, or gcc. An MS-DOS port, djgpp, is also available. As far as I know, there are versions of gcc for Macs and Windows machines, too. A very inexpensive MS-DOS compiler is Power C from Mix Software, 1132 Commerce Drive, Richardson, TX 75801, USA, 214-783-6001. A shareware MS-DOS C compiler is available from ftp.hitech.com.au/hitech/pacific. Registration is optional for non-commercial use. Archives associated with the comp.
Related QuestionsDo I need a C++ compiler to use TurboExcel?
Savvysoft - A New Spin on Derivatives SoftwareYes. While TurboExcel will write the C++ code, you'll still need a compiler. However, several are available for free. In fact, TurboExcel ships with one, and even Microsoft offers one.
Related QuestionsWhat optimizations does the C# compiler perform when you use the /optimize+ compiler option?
CThe following is a response from a developer on the C# compiler team: We get rid of unused locals (i.e., locals that are never read, even if assigned). We get rid of unreachable code. We get rid of try-catch with an empty try. We get rid of try-finally with an empty try. We get rid of try-finally with an empty finally.
Related QuestionsI need to compile a program from C/C++ source code. Can I do so with Jumpline.com?
Jumpline.com - VDS FAQYes; our J4-VDS hosting plan and above include the GCC compiler for building C and C++ applications, Perl modules, and other code from source.
Related QuestionsI have dip switches and a SuperSet Menu. Which should I use?
Technical Support - Digitizing & Measurement Products - ...You can use either. The SuperSet Menu over-rides the Dip Switches. However, if you press the reset button on your controller or turn off the digitizer, you will need to reselect the SuperSet code you wish to use.
Related QuestionsWhat compiler can I use to compile device drivers?
Driver Development FAQsWhen you build Solaris kernel modules use the same compiler that Sun used to build the OS. SunPro C is the only supported compiler. The following table gives the SunPro C compiler versions used to compile Solaris releases (in descending chronological order). The SunPro compiler does not work in compliant mode (-Xc), because the system header files are not fully compliant. Note: To ensure that compilers do not optimize away accesses to device registers, you must use volatile properly.
Related QuestionsWhat compiler arguments should I use to compile a gtkmm program?
gtkmm Frequently Asked QuestionsYou should use pkg-config's PKG_CHECK_MODULES macro in your configure.in file, as demonstrated in the gtkmm_hello package. Since this is the single most asked question about running GTK+ programs, we'll answer it here, even though it is in the GTK+ FAQ. Make sure the /usr/local/lib (the default install dir for gtkmm) is properly configured in your /etc/ldconf or that it is in your LD_LIBRARY_PATH environment variable. Alternatively, specify another prefix when running configure.
Related QuestionsDoes the code get generated each time when I compile the file in the Agent Toolkit Compiler tools?
AdventNet SNMP Agent Toolkit-SNMP Agent,SNMPv1/v2c Agent,Jav...No. Code will be generated only when you do code generation for the loaded files and not while compilation. Source Code can be generated once, and instrumentation and compilation can be done any number of times without having to regenerate the code.
Related QuestionsWhich C/C++ compiler should I use to build for /uns?
The /uns Maintainers' Frequently Unasked Questions Listof this fall, all Linux machines should use Fedora Core 2, where the system compiler is gcc 3.3.3. This is a fairly cutting-edge gcc and should handle most modern C/C++ code. On Solaris 2.5, the supported GNU C compiler is much older and buggier and should not be used; use the version in /uns if at all possible. Please note that various versions of gcc/g++ (particularly, though not limited to, 2.x and 3.x lines) may use mutually incompatible C++ object ABI's.
Related QuestionsHow do I compile and run my C++ procedures for Lab 1?
CS 241 Frequently Asked Questions (FAQs)For the "B" part (including the version in which you also return the pair of points along with the distance), you are expected to put your divide-and-conquer algorithm in a file called "closest-pair.cc" You will also need to modify lab1b.cc as indicated. A makefile is included with the provided code. Copy that into the directory with the rest of the code. Then just type "make". After successfull compilation and linking there will be a file called "lab1b.out". Just type "lab1b.out" to run it.
Related QuestionsIs the generated code in C++ compile-able on Unix and Linux?
SmartState - UML State Chart, CASE Tool, Automatic State Mac...The generated code follows ANSI standard. It is primarily tested with Microsoft Visual Studio compiler and GNU gcc compiler on Windows. Since it is ANSI compliant it will get compiled on other platforms like UNIX & Linux. Yes. But the notation is slightly different from UML notation. Please refer to the user guide for more information on how to achieve the Fork & Join behavior. Also there is an example to demonstrate the usage.
Related QuestionsWhere is the C compiler or where can I get one?
Solaris 2 FAQWhere have you been? :-) Sun has dropped their old K&R C compiler, supposedly to create a market for multiple compiler suppliers to provide better performance and features. Here are some of the contenders: SunPro, SMCC, and various distributors sell a new ANSI-standard C compiler on the unbundled (extra cost) SPARCcompiler/SPARCworks CD-ROM. There are some other nice tools there too, like a "make tool" and a visual diff (interactive diff).
Related Questions