c++ compiling problem

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2003
Posts: 208
Reputation: camelNotation is an unknown quantity at this point 
Solved Threads: 2
camelNotation's Avatar
camelNotation camelNotation is offline Offline
Posting Whiz in Training

c++ compiling problem

 
0
  #1
Sep 13th, 2003
Hi again.Read the source code below please:
// Determining the size of variable types

#include <iostream.h>

int main()
{
cout << " The size of a bool is:\t\t" << sizeof(bool) << " bytes.\n";

return 0;
}

p:s:I have not included the other variable types because there was no error message for them.The error message says the bool is an undeclared identifier.c++7,or c700.that's what my cd says!I don't know how to write my code in notepad and then transfer my file from notepad to the compiler to link.I have Borland Turbo C++ Version5.02 in that cd.Should I try to install turbo c++ and then try to use the borland compiler for my c++ codes? I don't know but how is it possible to use other compilers except than the default one I use with c++?
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: c++ compiling problem

 
0
  #2
Sep 13th, 2003
I just compiled your program with gcc on my linux machine, and it told me that a bool is one byte. Sorry, I have no recent experience with Borland's compiler tools - the last time I used Turbo C++ 4.5 I was back in 10th grade.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: c++ compiling problem

 
0
  #3
Sep 13th, 2003
Also, use <iostream> instead of <iostream.h>
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: c++ compiling problem

 
0
  #4
Sep 13th, 2003
Sorry, I missed your P.S. Well, you're using an IDE, integrated development environment, which means that your editor and compiler are built into one. If you have Microsoft Visual C++ 6 or Visual C++.NET handy, you can try the compiler built into that IDE.

I just tried the gcc compiler on linux and it worked (as I noted already).
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: Sep 2003
Posts: 208
Reputation: camelNotation is an unknown quantity at this point 
Solved Threads: 2
camelNotation's Avatar
camelNotation camelNotation is offline Offline
Posting Whiz in Training

Re: c++ compiling problem

 
0
  #5
Sep 13th, 2003
i see.thankx.Does that mean I can write my source codes,following my c++ syntax in .net compilers?great...
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: c++ compiling problem

 
0
  #6
Sep 13th, 2003
If you have C++.NET, you can compile in that. However, there are some differences depending on what platform you're programming for. C++.NET has a lot of proprietary built-in functions, for example.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum


Views: 3734 | Replies: 5
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC