yordan
May 23 2007, 03:30 PM
If you already had the same problem I just experienced, you should probably be interested by this trick. I just installed a compiler, and I wanted to know if I installed the C and the C++ compiler, or only the C compiler. The answer is simple : let's use small sample programs. Everybody know the well-known "hello" world C program, it compiles with a standard C compiler. CODE main () { printf("Hi, Folks, what s new"); } And here is a sample C++ "hello world" program : CODE #include <iostream.h> main() { cout << "Hello World!"; return 0; } The second sample program compiles only with a C++ compiler, the standard C compiler gives an error for the "cout" syntax. So, using these two small pieces of code allows you to check that you have both the standard C and the C++ compilers. Hope this helps you as it helped me. Regards Yordan
Reply
WeaponX
May 23 2007, 10:48 PM
Haven't used those compilers that were meant only for C or only for C++. The ones I tried usually compiles both, but that's definitely a good thing to know. Even Borland's Turbo C++ (name implies that it's a C++ compiler) works with the C language
Reply
miCRoSCoPiC^eaRthLinG
May 24 2007, 02:57 AM
QUOTE(WeaponX @ May 24 2007, 05:48 AM)  Haven't used those compilers that were meant only for C or only for C++. The ones I tried usually compiles both, but that's definitely a good thing to know. Even Borland's Turbo C++ (name implies that it's a C++ compiler) works with the C language  Yep - all C++ compilers are supposed to be backward compatible, i.e. be able to compile C code as well. That is a standardised rule.
Reply
yordan
May 24 2007, 01:35 PM
QUOTE(miCRoSCoPiC^eaRthLinG @ May 24 2007, 04:57 AM)  Yep - all C++ compilers are supposed to be backward compatible, i.e. be able to compile C code as well. That is a standardised rule. Yes, and the trap is that C-only compilers won't compile C++ programs. So, if you prepare a system for somebody else, you should better verify it before calling your collegue, or you will have to pay an apologizing beer. By the way, I wrote this in the "How-To's" section, because there is no "Tricks and Tips" section.
Reply
Recent Queries:--
c compiler fclose - 48.17 hr back. (1)
Similar Topics
Keywords : install, c, c, compiler, simple, difference
- How To Install Windows Xp Professional
(3)
Mccodes V2
i just bought mccodes and i cant install it (6) i just bought mccodes and i cant install it!!! i uploaded all the files (including
class) and when i open installer.php it says everything is ok except for Game folder writable which
says failed and beneath it says One of the basic diagnostics failed, so Setup cannot continue.
Please fix the ones that failed and try again. so any ideas on what to do ?(i cmodded all files to
777 becouse im using http://000webhost.com ) /unsure.gif" style="vertical-align:middle"
emoid=":unsure:" border="0" alt="unsure.gif" /> /blink.gif" style="vertical-align:middle" emo....
Simple Java Question
One Variable; Multiple Classes (3) I’m probably the only person that is able to do so much with Java3D and yet still can't
even get some of the Java basics down. Anyway is it (and if so how is it) possible to make a
variable editable and readable in multiple class files? It seems like this should be an easy
question to answer, but here is a little code to help you understand what I am talking about. CODE
public class test extends Applet{ public int Col = 0; [some long code basically all it
does is call for a collision behavior] [(TestB multiple times every 100 millisecon....
How To: Make A Simple Php Forum System
(4) Hello, One of my first ever projects I embarked on when I began to understand PHP well was a forum
system. I've decided to begin writing a tutorial to help people start one of their own. The code
for this project is based on that of OakumBoard/cBoard, my own forum software which can be seen
running at www.sonicxtremegm.co.cc Anyways, time to start off, you must run this SQL query on an
SQL database with a name of your choice: CODE s CREATE TABLE `forums` (
`id` int(3) NOT NULL auto_increment, `name` varchar(80) NO....
C/c++ -gdb Linux Debug Tool
Simple Gdb tutorial (0) To run the C/C++ file use $ gcc –g –o test sample.cpp To debug the code use following
command $ gdb test --- you will get following messages GNU gdb Red Hat
Linux (6.3.0.0-1.122rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered
by the GNU General Public License, and you are welcome to change it and/or distribute copies of it
under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty
for GDB. Type "show warranty" for details. This GDB was configured as "i386-redh....
Ubuntu- How To Install C/ C++ Compilers.
(2) Once you install Ubuntu. If you want to develop code in C or C++ you need to update the package.
Default install will not come with development tools. Synaptic pckg manager is a very usefull
tool in ubuntu. This can be used to install many development tool. Just look for Synaptic pckg
manager and put check for gcc 3.4 or later, glibc or any other package you need, then update.
Your ubuntu is now ready to use for C,C++.... /smile.gif" style="vertical-align:middle" emoid=":)"
border="0" alt="smile.gif" /> ....
Easy Visitor Counter
Easy to use and to install (3) Add this to the page you want to count the visitors on: CODE <?php
$logfile="counter.txt"; $returnpage =
htmlentities($_GET['count']); if (! @$file =
fopen($logfile,"r+")) { $count="1"; } else { $count =
@fread($file, filesize($logfile)) or $count=0;
fclose($file); $count++; } $file = fopen($logfile,"w+");
fputs($file, $count); fclose($file); ?> The....
Strange Error When Trying To Install Fedora Core 9
(5) Hi all, I tried to install Fedora Core 9 in a VmWare virtual machine under WinXP. I downloaded the
DVD ISO image and proceeded with the installation. When the process was started since about a
minute, the following error did show: "The file evince-2.22.1.1-1.fc9.i386.rpm cannot be opened.
This is due to a missing file, a corrupt package or corrupt media" Fine, I told to myself,
let's download the ISO image again, this time from a different server, just in case. No joy,
same error. Tried another couple of times, each one using a different server for the download. Sa....
Linux For Beginners- Easy To Install
(10) Which Linux distru is for beginners and Easy to install?....
Myspace Gold Script
How to install (2) Hello, I have a MySpace Gold Script but do not know how to use it. Can someone help!? I have a
MySpace gold script, this will let me build my own social networking site. I dont know much about
MySQL or Myphpadmin. This is my installation instructions To start with open the mainfile.php and
edit the settings to reflect your own. You will need to know your mysql database settings. If you do
not know what these are please ask you webhost and they will provide them to you. After this file
has been edited to your server settings, make sure that it is chmod to 444 (read ....
How To Install Linux Suse
(1) QUOTE Installing Suse Linux 10.1 This article is a "walk-through" of how I've installed
and configured Suse Linux 10.1 on 5 machines. This will be updated as I find things that may be of
interest. Please do not contact me with tech support questions. You'll find people far more
qualified to answer any questions at the 2 forums listed below. At some time or another I've
found most of what I know of Suse there. I hope that you will find this information helpful in your
dealings with Suse 10.1. Suse Linux Community Suse Forums (Use the search functio....
How To Install Linux Without A CD or DVD?
Would like to learn how to use Linux but don't know how to install (11) Hey! I've tryed to install linux without a cd (as they said on the website).. But I
did'nt understand it so good =/ Can anyone please tell me how I can install linux without a CD?
Any version.. The only thing I need is a fast one (faster than windows).. I am completly new (never
tried it before) and would want to learn Linux. But thats not easy, if I don't know hoiw to
install it /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Thanks
//Feelay....
Gimp: Working With Text
Simple GIMP tutorial for beginners (5) GIMP Working with Text 1) Start a new image with dimensions that hold your text. Plan for extra
room. 2) Text Tool: Create a Text. Type in a name or something. Pick a font and Size of 50 pixels.
3) Adding a Shadow: There are different ways add a shadow. There are many ways to add a
basic shadow but some will result in your shadow being clipped on the edges. So I'll show you a
work around. This would also Apply when part of your blur - or other filter - gets knocked off the
text selection you apply it on. I've found out you can do two things. 3.A) I....
A Simple Register Script
This Is a Very Simple Register-Script (3) Some time ago, i made a login-script. But how do you use a login-script, if you can't register.
So this morning, I decided to make a register-script.. What you should already know: The php
basics and a little more. How to use php and mysql together. The HTML basics (to make the forms).
The first thing we should do, is creating the database tables. Here is the code: CODE CREATE
TABLE `user` ( `id` int(4) unsigned NOT NULL auto_increment,
`username` varchar(32) NOT NULL, `password` varchar(32)....
Very Simple Login-script
This is a very simple and secure login-script (18) Hi. This is my first post here. please Tell me if i do something wrong. This is a very simple and
secure login script. I will try to add as many comments as possible, to make it easier to
understand. Lets start with the database. Just make a new SQL file, and call it whatever you want.
Paste this code: CODE CREATE TABLE `user` ( `id` int(4) unsigned
NOT NULL auto_increment, `username` varchar(32) NOT NULL, `password`
varchar(32) NOT NULL, `level` int(4) default '1', PRIM....
Looking For Linux
2 choices that I will choose - make it easy to install and MAINTAIN (34) Ok I have tried Linux before, it was ok, until something with the kernel screwed up and it left me
with a command line interface that I didn't know what to do. I am looking for 2 different
distributions of Linux here, my first one is for: (Currently running Windows XP SP2) A computer
with 512 MB RAM Pentium 4 processor Internet Access GNOME or KDE desktop, doesn't matter Minimal
command line work!!! Absolutely no command line work when installing. I have tried
Ubuntu, it was easy enough. Anything easier than Ubuntu and I'll give it a try. M....
How To Boot A Pc From Your Usb Flashdisk
A simple, harmless technique (17) Probbably some of you have the same annoying problem. I often have to boot under DOS in order to
perform some maintenance things - re-format or re-partition hard disk, do virus diagnostics or
recover files. I love using fdisk, or McAfee viruscan in command line mode. I love typing "fdisk".
For that, MS-DOS command line is nice. Booting from a flashdisk is faster than floppies, and a
flashdisk a lots more space than a floppy. So, now, how to boot from a flashdisk without
complicating or dangerous things ? Here is the way I do it. Of course, I found the trick from
several ....
Mysql And Php
When trying to install Joomla (15) I don't know if this is the correct forum, but here is my question: I'm trying to test
Joomla and some forums in my computer, I have already installed MySQL with the GUI tools, Apache,
and PHP with the MySQL and MySQLi extensions, but when I'm trying to install Joomla I get this
error: Required Settings Check: ------------------------------------- PHP version >= 4.1.0
Yes - zlib compression support Available - XML support Available - MySQL support
Unavailable configuration.php Writeable Session save path Unwriteable Not ....
Oracle 10g Install Issues
(27) So I'm trying to install 10g on my XP Pro development box, and the install goes fine (I do the
basic install of enterprise edition, I'm by no means an oracle expert) and when it gets to the
part where it wants to create a database, the database creation assistant fails saying first that it
cannot retrieve credentials, and then that it can't connect to ORACLE (I'm assuming this is
the instance name). Anyone have *any* idea what's going on here?....
Fedora Core 6 Install Problem
(6) I have tried three times to get Fedora Core 6 to install but I keep getting the same error message:
“there was an error running your transaction, for the following reason(s): file conflicts”. I am
using all of the default settings except changing the time zone and basically installing all
packages. The error always happens near the end of the fifth disk. I have run sha hash checking on
all media and everything checks out. Has anyone had this problem or a possible solution?....
Installing Glut To Dev C++
A tutorial to install GLUT on Dev C++ (3) This is a tutorial that someone submitted to my programming site when it was up because I didn't
know how to install glut on any other compiler than my own. I though it would be helpful to post
this up for everyone here so they can use GLUT as well without having to google for hours. I'm
not sure if I'm allowed, but I have quoted it and have given credit where credit is due, so if
this post is allowed I hope this helps those people who couldn't program in GLUT yet. QUOTE
Installing G.L.U.T. to Dev C++ By James Duran (email: vrok137@yahoo.com) ....
Games For Samsung D900
Install games with data cable (3) Hello everyone. I have a problem and perhaps you can help me out? I have a samsung d900 and I want
to install games using a data cable. Does anyone know how to do it? Thanks in advance!....
PHP Tutorial: Form Verification And Simple Validation
A One Page script for PHP form verification. (12) Having used various means of verifying HTML forms I believe that this method of verifying a form
to be the best mostly because it does everything on one page. It presents the form on one page and
then when the submit button is pressed, if all the required fields are not filled out then it will
present the form again with all the fields intact and in red lettering will point out the fields
that are required to be filled out in red. It is not possible to click submit using this method even
if the user has turned JavaScript off. While it is possible to use javascript to ....
How To Install Applications In Fedora
noob question (12) I'm a linux user since a few days, i've decided to change to linux coz i'm not very
pleased with Windows versions . So i wonder how do i install aplications like Files Sharing and mp3
?....
Alt Txt Tooltip Popups Over Text Links, How To Do?
searching for a simple way... (11) How can I insert an alt txt caption for a text link, so that when they hover over the text it pops
up with more info about the link before the person clicks on it? Do I have to use an image map over
the text for that, or is there a simple function that does the trick?....
How To Connect Dual/triple Monitor + Advantages
Guide on how to install mult. monitors (21) I'm sure 95 % of you are running your system with one monitor. Primarily because that is the
default for any computer. What if i told you that running your system with dual monitors or even
triple monitors will increase your user performance extensively? Ways it helps: - can play some
games while instant messaging, writing emails, watching movie on other screen, looking up something
online, etc... - Helps with working on websites or other programming, because code can be on one
side, while the preview image is on the other monitor. - Spreads the space out so you h....
Hack Websites
using a simple javascript (8) Sometimes, I come across websites that are very annoying, like webpages which play embedded music
files or excessive animations. Seems that people who encouter such websites like me have a solution
is you use Firefox. Just use an extension and you can hack and alter these websites and
webpages! According to Wired (http://www.wired.com/wired/archive/13.09/start.html?pg=7):
QUOTE Remix culture has hit the browser. Just as you can pimp your Scion with snap-on parts, you
can modify Web sites to suit your tastes - whether the authors like it or not. The enabling tec....
Notebook Or Laptop?
What's the difference, if anything? (16) Okay - now that I've started thinking about "laptop" and "notebook," I have a question for
anyone who might be able to explain. Is there a difference, or is it just a matter of two terms
describing the same thing? If there's a difference, what is it? Now that I'm wondering
about it, it's going to bug me for the rest of the day! *grins*....
Looking For A Good C++ Compiler
I'm hoping to get a URL to get C++ (17) Hey! I'm looking for a website where I can download a good working C++ compiler. Even if its
not a download site, at least a place to jsut write small programs would be nice. I have no
intentions of making anything big; I just like to program in my free time. Also, I'd prefer they
are free, but if anyone else is looking, they may not mind paying. Alright, Thanks!....
What's The Difference Between Linux And Unix?!?
(15) are they even made by the same people...?....
Looking for install, c, c, compiler, simple, difference
|
|
Searching Video's for install, c, c, compiler, simple, difference
|
advertisement
|
|