Saturday, May 22, 2010

C++ compilers?

i need a good website which gives me a free download of a c++ compiler for red hat enterprise linux operating system.

C++ compilers?
Actually, the GNU compilers should have been installed with Linux - they have been on every Linux system I've ever set up. You can test it by typing 'man gcc' to see if the man page comes up - that's usually a good indicator. If you chose not to install the compilers, they're still on the install discs, or you can download them from http://gcc.gnu.org/


C++ compilers!!!!!!!!!!!!?????????...

why dont u yahoo answers nerds answer me when i ask u a simple question like: give me a good website where ic an get a free download of a c++ compiler (or interpreter) for red hat enterprise linux operating system!!!!!!!!!!!!!!!!!

C++ compilers!!!!!!!!!!!!?????????...
Because we think a person who wants to write C and C++ code should be witty enough to Google the term himself...





Here s your answer anyway.





http://www.gnu.org/software/gcc/


Upgrading C++ compilers free of cost?

I hav an older version of turbo c++ and i am not able to execute the "exception handling programs(that contain the try,catch,throw blocks)" on it.compiler fails to identify try,catch and throw.


can anybody pls tell me how to upgrade my turbo c++ or any other way so i am able to execute the exception handling programs?


pls mention appropriate links for upgardin the version.thanks.

Upgrading C++ compilers free of cost?
Borland, now called Imprise, hasn't made Turbo C++ in over 10 years, it was replaced by Borland C++ which was later replaced by C++ Builder.

hamper

Please , can any one help me to found the COOL compiler code in C++ language with its tools ? I've a project..

This is a job for google, not yahoo answers. The COOL site is below:

Please , can any one help me to found the COOL compiler code in C++ language with its tools ? I've a project..
Use gcc/g++. If you install Fedora core 5/6 Linux you will get gcc, g++ and java compilers. Coding on Linux is the best programming practise today.


How to compare structure in C language? Whether it is compiler dependent?

This questions dependent on C language....

How to compare structure in C language? Whether it is compiler dependent?
The previous answer is not only wrong, it is


inefficiently wrong :-)





With respect to the efficient part, you do NOT


need to write a "compare" function as described


because it already exists in all ANSI C


implementations. See the function "memcmp()" in


your documentation.





With respect to correctness, this solution won't


consistently work. What's really terrible is


that it does work *some* of the time.





Consider this struct:





struct foo {


    char a;


    long count;


}





While field "a" will be at offset "0" within the


struct, on many machines "count" will be at


offset "4" (with 3 bytes of padding between


them). It will be as if you declared the struct


as:





struct foo {


    char a;


    char padding[3];


    long count;


}





If you create the struct as a stack variable or


from a call to "malloc", it can initially have


garbage in those padding bytes. Then if you


assign a value to "a" and "count", you still have


garbage in the padding area. Two structs with


identical values for "a" and "count" will still


compare unequal if they have different garbage in


the padding area.





Thus, the "memcmp" strategy for comparing them


won't consistently work if there is any padding


in the struct. In this case, you are forced to


compare fields.
Reply:Not to "pile on", but it may be worth pointing


out that the alignment padding isn't the only


source of bugs in the solution suggested by


"Vasudev TS".





A similar problem can be caused by bit fields


which don't completely fill up the word that


they're in:





typedef struct {


int id:12;


int group:12


int flag:1


} key_t;





struct x {


key_t key;


struct x *next;


}





In this simple example, there are 7 unused bits


in the "key_t" bitfield, which can vary between


otherwise identical copies of "struct x".





Even if you carefully check that your structure


doesn't contain any alignment padding or unused


bitfield space, how can you protect against


someone making a change (ie. adding another field)


some time in the future? What's insidious is


that it might not fail during your regression


tests, but only on some particular data set


while running your customer's data.





Bottom line: Bitwise struct comparisons don't work.
Reply:If you are comparing two structures of the same type, you can do so by writing a c function that takes te two structures and the size as arguments and compare them as if they are characters. To make it clearer the function could be some thing like this:





int compare(char *a, char *b, size)





This function compares both a and b and returns 1 if same and 0 if not.





while calling it from your main you could call it as below:





struct str *s1, *s2;


//assign values to the members of both ....





sts=compare ((char *)s1, (char *)s2, sizeof(struct str));





Additional Details:


I have answered a similar question earlier and provided a tested program as an example: Please refer to the question titled:





"How can we check whether the contents of two structure variables are same or not?"





in yahoo answers under programming %26amp; design section


Where can I download a free C and C++ IDE with built in compiler?

I am working in a Windows environment. I need to learn the language so I can distribute free softwares. I am also planning to create my own computer language from C++ or C. Is it possible?





Its one of that plans that I am purely blind of its whereabouts. That is why I must learn the language. I welcome any recommendations.





My motivation is to stop piracy that arises because of the Nemrod type of the worlds affection in the game of playing with the licenses of the Monopolies. I am pro to free software ventures and building a platform based on RIGHTEOUSNESS.





Is there someone who can lead my journey right? Is there anybody willing to help.





Please speak out.

Where can I download a free C and C++ IDE with built in compiler?
go to www.eclipse.org





there will be an ide for c and c++. download that.





eclipse is one of the best tool and ide to devolop projects.





I think you ll be helped a lot by this.





enjoy programming in it. There would be more details of the ide in the website. all the best
Reply:You might take a look on SourceForge. There are plenty of open source IDEs there as well as other open source projects.
Reply:http://www.microsoft.com/express/vc/


Which of the following may result in a compiler error in C#?

1) Referring to a derived class object with a base class reference





2) Referring to a base class object with a derived class reference





3) Referring to a base class object with a base class reference





4) Referring to a derived-class object with a derived class reference








Sorry, but I don't understand this at all. It's really confusing. Can you explain it to me, please?

Which of the following may result in a compiler error in C#?
#2 will be an error.





Imagine you have a superclass called GeometricFigure, and two subclasses called Circle and Square.





Create one object of each type.





Then, since the Circle object IS A GeometricFigure object (it's a subclass), then it's ok to have a reference of type GeometricFigure that refers to the Circle. That's the whole point of inheritance.





However...it's not true that a GeometricFigure IS A Circle. It might be or it might not be. But if it WASN'T a Circle (maybe it was a Square), and you tried to call its circumference() function...big problem.





So as a rule, for any given object, you can use a reference to its actual class or any of its PARENT classes or interfaces. You can't use a reference for any of its subclasses.





(#3 and #4 are obviously ok to do.)

bloom