Monday, May 24, 2010

What is different between C and C++?

Can I use C++ compiler for programming C. whether its give wrong solution

What is different between C and C++?
C





A high-level programming language developed at Bell Labs that is able to manipulate the computer at a low level like assembly language. During the last half of the 1980s, C became the language of choice for developing commercial software. C, and its object-oriented successor C++, are used to write a huge variety of applications and almost all operating systems. There are C/C++ compilers for all major operating systems and hardware platforms. C was standardized by ANSI (X3J11 committee) and ISO in 1989.





C++





An object-oriented version of C that has been widely used to develop enterprise and commercial applications. Created by Bjarne Stroustrup, C++ became popular because it combined traditional C programming with object-oriented programming (OOP) features. Microsoft's Visual C++ is the most widely used C++ language.
Reply:C++ is object oriented. You can define classes.





You may mimmick object oriented programming with plain C, but is a little bit more complicated.
Reply:You can definitely use a C++ compiler to compile a C program. C++ is just an extension of the C language, that supports Object Oriented programming.
Reply:C++ is an increment over C (++ is an increment operator). The main difference is that C++ is a partial Object Oriendted programming Language. C++ compiler supports Basic C syntexes as well as OOPs features like Inheritance, Polymorphism, Data Abstraction etc etc. I suppose, C compiles may not support OOPs features.


U must add (include) proper header files. And remember to save it with a proper extention (.c for C programms and .cpp for C++ programms)


U can refer Kanitkar's Let US C %26amp; Let Us C++
Reply:You can certainly use C++ compiler to C programs. The difference is that C++ supports object oriented programming. Any wrong solutions you may be getting is because of a conflict in the program itself not the compiler.
Reply:two little plus signs. do i win the prize?
Reply:ok.. i am telling u


1. C with claasses hence C++


2. C++ provides data abstraction,encapsulation,inherentence and polymorphism concept.


3. C is top down programming approach.


C++ is bottom up programming approach.


4. In C Structure u can not declare function where as in C++ u can declare function(like classes)


5. C is faster then C++


C++ is generally slower at run time and much more slower at compile time.


6. In C does not have class/object concept.





that's all my dear hope u got it(onlykeshu@yahoo.co.in)
Reply:Hello. - Links Below.





Have a nice day. :)
Reply:You should be able to use a C++ compiler to program C and vice versa as most decent C++ compilers have a backwards compatibility in a sense.





There are certain things to watch out for and ways to do things in order to ensure the compatibility and correct syntax etc. Check this site http://developers.sun.com/prodtech/cc/ar... for an overview of this subject.





Good luck with your programming


How to make a program in C++(turbo c++) that can do addition with the given of two integers?

how to make a program in C++(turbo c++) that can do addition with the given of two integers?





I know this is odd but i just want to know how?what if I want to compute 3 integers or 4? How do I do it?





by the way I'm a beginner. Plese don't tell me to find it in the internet because I've already did it. the syntax is different because were using a very old turbo c++ compiler (v1.01)





post the program here...thanks

How to make a program in C++(turbo c++) that can do addition with the given of two integers?
#include%26lt;iostream%26gt;


using namespace std;





int main(int argc, char **argv)


{


int a,b,c,i;


int g=2;


c=0;


for (i = 0; i%26lt;g; i++)


{


cout %26lt;%26lt; "get number";


cin %26gt;%26gt; a;


c = c+a;


}


cout %26lt;%26lt; "number is " %26lt;%26lt; c;


}





just change the number 2 with the number of integets you want to add

yucca

Trouble with graphics driver in Turbo c++!?

My Turbo c++ compiler gives an error message "Graphics driver not initialized please use initgraph".Even after using initgraph my compiler says the same problem?

Trouble with graphics driver in Turbo c++!?
Maybe you got the parameters wrong and initgraph failed to initialize, or maybe the BGI file is missing. The correct parameters are:





initgraph(int *driver, int* mode, char* path);





You would typically use DETECT as the driver, in which case the best possible drivers will be detected.





int gd=DETECT, gm;





You might want to specify the path to the graphics driver, which is EGAVGA.BGI for VGA modes (the typical mode). Make sure that it is in the computer. If TC is installed in C:\TC, do a search with the command (after CDing into C:\TC) with DIR EGAVGA.BGI /S


If it is there somewhere, you will see the path. If it is present in (say) C:\TC\BGI, you have to give the third parameter as


"C:\\TC\\BGI".


So, initgraph would typically be:





int gd=DETECT, gm;


initgraph(%26amp;gd, %26amp;gm, "C:\\TC\\BGI");


How Do I Compile C++ Source Code ?

I stumbled upon a c++ source code of a programm and it needs to be compiled by me. I am under win32 and i download the Dev-C++ compiler from sourceforge.


Tne source code i want to compile is http://www.shorturlsite.com/?r=8m


but i cant find how to do it. I tried opening the biggest file and compile that but it didnt work. Please help I really need to comile this programm...


Thanks in advance








PS: I have absolutely no knowledge of c++ or any other compilable language ( I can barely handle php)

How Do I Compile C++ Source Code ?
Well, to compile a C++ source, you shouldn't compile any random file, but the project file! I have looked over your source and it looks like a Visual Studio Project (one of the files has the .dsp extension). I am not sure if DevC can compile it, but you can give it a try. If it doesn't work, I recommend Visual C++ Express edition which is free and should do the trick (google for download ;).
Reply:Cute. An Rbot proggie


In c++, what is the difference between single and double quotation marks?

i'm a c++ beginner and i think that the c++ compiler notices the difference between single and double quotation marks (unlike the other languages i know).


when i try something like





if(ch=="Q") { cout %26lt;%26lt; "true"; }





it tells me that there's an error so i replace the quotation marks around the Q to be





if(ch=='Q'){ cout %26lt;%26lt; "true"; }





and it works fine. why is that?

In c++, what is the difference between single and double quotation marks?
usually the ' is for type char and " is for type string. if ch is char in your example you get an error because "Q" is different in type from 'Q'. 'Q' is a char so if char(ch)==char is evaluated but "Q" is string and char(ch)==string returns an error (invalid type).


Visual C++ problem?

I have just downloaded Visual C++ 2005 express edition. I am new to using the visual C++ compiler.





I see that there is a component called WebBrowser which allows you to view web pages on a form. I would like to be able to download a web page and save it to a file without displaying it.Is there a component you can use for just downloading or is there some way to use WebBrowser for this?

Visual C++ problem?
Hello,





The WebBrowser control is pretty limited in what it can do, and I don't believe that it by itself can download and save pages.





You might want to consider using the WebBrowser control for the display of pages but use the MFC class CHttpFile to download and save web pages. You should also investigate the "Internet Explorer control", which differs from the WebBrowser control in that the IE control allows you to programmatically control an instance of Internet Explorer.





Hope this helps.

chrysanthemum

Can i write c programs in windows xp? i have no problems using c on win98 & earlier.?

i use turbo c or borland / turbo c++ compiler. there is no problem with 98 %26amp; earlier. is there any solution?

Can i write c programs in windows xp? i have no problems using c on win98 %26amp; earlier.?
Go to borland website and post a question regarding this problem. But most probably you need to update your libraries files the .h extension. most likely it is the IDE(intergrated development environment) that contain the compiler that did not work try buying a new one or using an open source IDE like http://www.bloodshed.net/ If you want make a donation. :)
Reply:I've tried the compiler from blodshed.net and it works great with XP.
Reply:Borland TC++ works under XP as well as under 9x.
Reply:I really don't understand what your question is!
Reply:To program in a Windows C++ environment these days, you have to use Visual C++ or the .NET C# program. I'm sure there are other alternatives, but most people stick with the Microsoft products.
Reply:Ahhh Yes/ No maybe





ELL if I No


How C++ work in fullscreen mode in windows Vista?

Please help to make full screen of c++ compiler.


so that i can program finely..

How C++ work in fullscreen mode in windows Vista?
c++ can work in full screen mode in window vista.


when booting ur system,press F7,then start ur system in safe mode,or safe mode with networking,c++ wiil work in full screen mode.


other option is if u have 16 bit processor,open c++,right click and go to properties,and change the settings of font size etc.


and then it will work in full screen mode in normal mode too


otherwise install DEV-C++
Reply:dude c++ does not work in full screen with vista.Its still recent version vista compatible not came in .So wait for a while it ll come soon.


C++ Header file question (SystemInfo.h)?

i am building a C++ console application that requires me to include "SystemInfo.h"


i included this in my project (ie...... #include "SystemInfo.h")


and i am getting a compile error with microsoft visual c++ compiler:


fatal error C1083: Cannot open include file: 'SystemInfo.h': No such file or directory





i did some research but cannot find this file or where it is supposed to be located, any help would be greatly appreciated!!!!

C++ Header file question (SystemInfo.h)?
Systeminfo.h is probably a system header file. Use %26lt; and %26gt; instead of quote marks. That causes the precompiler to look in the system directories first.
Reply:I used to get that error when I forgot to save the file I included in the program. I hope you the error. Good luck!


C++ Problem, please help...?

I wrote this program, first I should say I'm an amature and I'm learning C++.


When I run this program if the input is a letter it returns you havent passed, but if the input is a number then the program halts and got hangged. whats the prob whit this program?


Im using DEV-C++ compiler








#include %26lt;stdio.h%26gt;


#include %26lt;windows.h%26gt;


int main()


{


int grade;


printf("Please enter your grade: ");


scanf("%d",grade);





if(grade %26gt; 10)


{


printf("Your have passed the test.\n");


system("pause");


}


else


{


printf("You havent passed the text.\n");


system("pause");


return 0;


}


}

C++ Problem, please help...?
Two advices:





1) Always initialize your variables. So:





int grade; // This should be: int grade = 0;





2) Move the "return 0;" statement out of the else-statement


as follows:








else


{


printf("You havent passed the text.\n");


system("pause");


}





return 0;
Reply:looks like you forgot the line "return 0;" after the system("pause"); line in your IF statement. you have it for the ELSE, but not the IF.
Reply:change the statement :-


scanf("%d",grade); to scanf("%d",%26amp;grade);

daffodil

C++ programming, Error E2194; could not find file hello.cpp?

I am trying to run a simple program and I've installed Borland C++ compiler for free on my computer. The code is supposed to simply write Hello World, on the screen in the command prompt box. The book I have tells me to type in bcc32 hello.cpp into the command prompt box to run the program, but I get the error message. It recognizes the bcc32 command, but then runs the E2194 message. I had to change the path in environment variables first since the bcc32 was not recognized at first, but after changing the path, this works. I have also created the two necessary text files bcc32.cfg and ilink32.cfg. The path is c:\Borland\Bcc55\Bin. I have the hello.cpp program in what I think is the right spot, but it seems to not be able to find it. Can anyone help me. I need to know how to tell the computer or program where to "look" for this file.

C++ programming, Error E2194; could not find file hello.cpp?
Borland is outdated!





Get a better compiler, like Dev-C++ (it's free, see sources).


Once you've installed it, click File (toolbar) %26gt; New %26gt; Project...


From there it'll give you a few program types.. (you can click the 'Introduction' tab for the Hello World example).





Have fun,


Dys.
Reply:dys is right you know dev-c++ rocks


C++, can't see a file, very simple question?

I am trying to run a simple program and I've installed Borland C++ compiler for free on my computer. The code is supposed to simply write Hello World, on the screen in the command prompt box. The book I have tells me to type in bcc32 hello.cpp into the command prompt box to run the program, but I get the error message. It recognizes the bcc32 command, but then runs the E2194 message. I had to change the path in environment variables first since the bcc32 was not recognized at first, but after changing the path, this works. I have also created the two necessary text files bcc32.cfg and ilink32.cfg. The path is c:\Borland\Bcc55\Bin. I have the hello.cpp program in what I think is the right spot, but it seems to not be able to find it. Can anyone help me. I need to know how to tell the computer or program where to "look" for this file.

C++, can't see a file, very simple question?
If configured correctly, it should be looking for the hello.cpp file in the current directory. If not, try fully qualifying the program, that is:





bcc32 c:\blahblahblah\hello.cpp





If that works, then you've got a configuration issue. Something should be set to check the current path first.


I need some help with c++?

im using a website to learn c++ and im trying to use this program but every time i run it it goes fine till the end. when its suposed to show the last output it shuts off to fast for me to see it. why doesnt it work? i even tried coping it and pasting it into the compiler and it didn't work. im using the dev-c++ compiler.





#include %26lt;iostream%26gt;





using namespace std;





int main(){








int a;





cout %26lt;%26lt; "What time of day is it?\n";


cout %26lt;%26lt; "1) Morning\n";


cout %26lt;%26lt; "2) Afternoon\n";


cout %26lt;%26lt; "3) Evening\n";


cout %26lt;%26lt; "Enter a choice: ";


cin %26gt;%26gt; a;





switch (a){





case 1:


cout %26lt;%26lt; "Good Morning!";


break;


case 2:


cout %26lt;%26lt; "Good Afternoon!";


break;


case 3:


cout %26lt;%26lt; "Good Evening!";


break;





default:


cout %26lt;%26lt; "Not a valid entry...";


break;





}








}

I need some help with c++?
You are probably on a Windows system. When you click your program in a folder, a DOS shell appears and runs the program. As soon as it is done, it will disappear.





You have two choices.





1. On the last line of the program, add the line cin.get(). That will keep the program up waiting for input from the user. Use the return key.





2. Open a DOS shell and run the program at the command line. You will have to cd into the directory where the program is located to run it.





Hope this helps.
Reply:I use MS Visual Studio 2005. You can get a free version online from Microsoft but I had same problem.





If you look, There's build to compile it. There's also a run without compile. Your program might have the same thing.





It should be under your menu somewhere, I clicked around till I found what I needed.


C++ beginner...?

i just got into programming and i have a cheap c++ compiler and i was playing around with it...i was wondering if i make a program that asks the question "what is your name?" is there a way to input more than one letter or variable for the answer because from what i have found i can only use multiple int's and not char's. any tips? keep in mind im just a beginner so if i sound stupid its because i just started messing with it like 10 min ago. thanks for your help

C++ beginner...?
Get a better compiler. I just had fun with this program. I compiled it on Linux using gcc and I'll show you the output in a minute.





#include %26lt;iostream%26gt;


#include %26lt;cstdio%26gt;


using namespace std;





int main(){





char Name[30];


char OtherName[30];





cout %26lt;%26lt; "Enter your name:";


cin %26gt;%26gt; Name;


cout %26lt;%26lt; "You entered " %26lt;%26lt; Name %26lt;%26lt; endl;


cout %26lt;%26lt; "Enter your name:";


gets(OtherName);


cout %26lt;%26lt; "You entered " %26lt;%26lt; OtherName %26lt;%26lt; endl;


return 0;


}








Here is what compiling and running it looks like:





jplatt@darkstar:~/Feb17$ g++ -o Name Name.cc


/tmp/cczWw2n0.o: In function `main':


Name.cc:(.text+0x204): warning: the `gets' function is dangerous and should not be used.





jplatt@darkstar:~/Feb17$ ./Name


Enter your name:John D. L. Platt


You entered John


Enter your name:You entered D. L. Platt





jplatt@darkstar:~/Feb17$





In other words, when I used cin %26gt;%26gt; Name it took everything I entered up to the first space and put it in name. There was more but it took it ALL and put in into OtherName. Happens. Your compiler should be able to do that if it's c++, not C.





Mind, GCC is not Linux-specific. In fact, my first experience with it was in 1987 when I was a word processor doing work for various engineering firms around RI which ran Unix. Linux came along in 1991. It's been ported to just about every OS which has come along since then. If you are on Windows the cheapest and least resource hungry is available for free download from http://www.delorie.com/djgpp/zip-picker....





There is an alternative: this is where one version of Linux shines. I'm talking about the livecd. You can download an iso file for free and burn it to a CD with nero or some other software. Knoppix was created by a computer consultant in Germany for use with his consultancy. It gives him a portable desktop to carry around with his favorite applications and the ability, should he choose to do so, This basically means, you burn it to a CD, set a computer to boot from the CD, start it up and you have a running Linux system in memory -- it saves nothing to disk unless specifically told to in a cumbersome manner-- and you can type in, compile and run C and C++ programs using one of the most sophisticated compilers out there, without having to go to the trouble of installing it. More information is at:


http://www.knoppix.net/wiki/Main_Page





You can do the same thing with Damn Small Linux which has among other advantages the iso file is much smaller and if you can get your machine to boot from a pen drive you can load it onto a very affordable one. More information is at:


http://damnsmalllinux.org/





I could fix the program above. Bluntly, I would prefer gets() or cin.getline for input but the first step is making sure you can compile one of these programs. If you can't get a new compiler. And hey, GCC has been around for twenty years now.
Reply:Look at the string class and cin.
Reply:i can help you with it, my msn is amwpessy@hotmail.com,or you can give me a email ------fadewolf@qq.com
Reply:/*I suggest to use Borland c++ compiler or turbo c++ compiler*/


/*Answer of your question is by using string method*/


/*see the following code*/


#include%26lt;stdio.h%26gt;


#include%26lt;conio.h%26gt;


#include%26lt;string.h%26gt;


void main()


{


char name[100];


printf("Enter your name ");


gets(name);


/*Then write any process you want*/


getch();


}

hyacinth

C++ Help Please!?

Where can I download a C++ compiler for free?

C++ Help Please!?
You can use Microsoft Visual Studio Express for free, though it has some limited features. If you're not doing anything complex, then this is a great tool.





http://www.microsoft.com/express/downloa...
Reply:www.bloodshed.net/devcpp.html
Reply:I agree with BalRog. You can get it from www.cygwin.com, but make sure you get the compiler and the debugger (gdb). You can also get several editors there, but I prefer Eclipse from www.eclipse.org (you need the CDT too)
Reply:Cygwin contains a free C++ compiler (g++) and a complete emulation of UNIX/Linux as well!
Reply:www.bloodshed.net/devcpp.html


I want to download turbo c++or borland c++ to do programs. can u help me?

i tried and download borland c++ compiler 5.5


i even saw the website for its detailed instructions


but i am able to work with the compiler


plz help me

I want to download turbo c++or borland c++ to do programs. can u help me?
Turbo C++ is, as far as I am aware, a dos based program, which will not work properly if you are using windows.


If you still want it, here are the links:


http://dn.codegear.com/article/20841 (turbo c++ 2.01)


http://dn.codegear.com/article/21751 (turbo c++ 1.01)





Borland C++ 5.5 would work on windows, but as you noted is very difficult to use.


If you are trying to learn c++ programming I would suggest one of the following tools:


Dev CPP:


http://www.bloodshed.net/dev/devcpp.html (The first link under downloads)


Eclipse:


http://max.berger.name/howto/cdt/


Microsoft Visual C++ 2005 Express:


http://msdn.microsoft.com/vstudio/expres...





These are all great tools to learn, but unfortunately none of them have easy support for graphical applications.





If you are looking to develop windows GUI programs (graphical user interface), such as most applications which are in use today, you can do that by using one of the free libriaries for c++ graphics:


wxWidgets, ATL, qt...


But that is an advanced topic in c++, also not very easy to write such applications.





If you are looking for a quick tool to get started with windows applications then you might wish to consider switching on to C# (which is kinda new, but becoming very popular) by Microsoft. It is based on .NET and there is a download on the visual studio express link that I posted above. With this it is much easier to create regular windows applications, also the language is very similar to c++.





Hope that helps.


Need a clarification about #pragma directive in C++?

When I compiled and ran the below code in Turbo-C++ compiler it is running fine. But when I tried to run the same code in VC++6.0 compiler it is giving two warnings as "Unknown Pragma"... it is not recognizing the key words Startup and exit. That is why the warnings a coming. Can you pls mention the equivalent CPP code which can run on a VC++6.0 compiler.





The code is as below:





#include%26lt;iostream.h%26gt;


#include%26lt;conio.h%26gt;


void f1();


void f2();


#pragma startup f1


#pragma exit f2





main()


{


cout%26lt;%26lt;"EXECUTING MAIN \ n \ n";


return(0);


}








void f1()


{


cout%26lt;%26lt;"EXECUTING F1 \ n \ n";


}





void f2()


{


cout%26lt;%26lt;"EXECUTING F2 \ n \ n";


}








OUTPUT:


EXECUTING F1





EXECUTING MAIN





EXECUTING F2

Need a clarification about #pragma directive in C++?
Ok, this is what happens in Turbo C++. The statement #pragma startup f1 tells the preprocessor that in this program the special module name startup, usually predefined as pointing to the library startup routine; is to have the function name f1 expanded into it at the end of the function. So, when the program is loaded and about to begin execution, before it begins main; it finds and executes f1. The same happens with the f2 function and exit.


What you need to know to make this work is what pragma name the VC++ 6.0 compiler uses instead of startup. There are three ways to find out. From worst to best: 1) Guess and try, it could take thirty seconds or thirty years. 2) Search out an answer from the included header files. Probably get done in a few days at most. 3) Quickest and best is ask Microsoft by using the search facilities at the link below. I hope this helps you out.


Trouble in the header file pshpack.h in C during compilation.?

While compiling a C program to connect the front end C, with the MS-Access database, I get a FATAL error like this::





"" Fatal INCLUDE\PSHPACK.H 7 : Error Directive " 1 as alignment isn't supported by the compiler""





What is a fatal error?How do I rectify this error. I have a TURBO C/C++ compiler and I downloaded this include file %26lt;pshpack.h%26gt; only recently.

Trouble in the header file pshpack.h in C during compilation.?
A fatal error is any error that the compiler / linker /assembler has designated, internally or by an input switch, to stop creation of output files on. In other words, it is "fatal" to the process. These are usually big boo-boos.





In this case, I have little information to base an answer on. It would have been nice to know what version of the compiler, where the file was downloaded from and what it is touted to do and by who.





At a guess from what I see (including the error verbatim was very smart!), the code alignment is wrong and set at 1. Probably this relates to boundary alignments, which enter into the complex world of Windows file format options, such as PE(Packed Executable) files. I would hazard a guess that one of the following two things is happening.





1). Your version of Borland Turbo C / C++ is too old to have facilities to handle this type of boundary alignment as the library and header files need.





2). Your compiler is capable to handle this type of file alignment, but the automatic or default settings ( which are usually set to allow most compilations to be as painless as possible!) have been accidentally or intentionally changed to something non-compatible with the current project.





I hope that this gives some idea of the problems roots. When in doubt, investigate the documentation thoroughly. All advice is free and damn well worth it!

poppy

Are there any c++ compilers that work with vista?

for free?i try using dev-c++ but it doesnt compile.....


and it should. im using windows vista premium.


when i was using xp it worked.

Are there any c++ compilers that work with vista?
You can allways use the .NET SDK which includes Microsoft's C++ compiler, amongst many other. It is included with the Express Edition for Visual C++ 2005 which can be downloaded for free.


ANother solution would be Mingw compiler with code::blocks. Code::Blocks is an IDE which virtually runs with any C/C++ compiler you tell it to run.. By default it comes configured with Mingw.


http://www.codeblocks.org/
Reply:Microsoft makes Express 2005 available as a free download.


http://msdn.microsoft.com/vstudio/expres...


I'm using the netbeans IDE with the C++ Dev Pack i'm using cygwin as the compiler?

So what is your question?


Visual C++ Express help?

How do I compile my program into a .exe file in Visual Studio C++ 2008 Express. If I can't, please refer to me an easy-to-use C++ compiler that lets me compile my program into an .exe file.

Visual C++ Express help?
Go To


My Documents -%26gt; Visual Studio 2008 -%26gt; Projects -%26gt;(The Name of your project) -%26gt; Debug or Release





To determine where your program is you need to know if you have compiled a Debug or a Release .exe file, to determine this there will be a dropdown box next to a green arrow in the VisualStudio window( The window that you edit/compile your Program with.) and it will either say Debug or Release but will have Configuration manager in that window.





*note about debug compiled: They run a little to a lot slower than a release version, you really wont notice the slowdown until a few hundred/thousand lines of code have been written and being used.





The F5 key is to start "Debugging" your program.
Reply:When you select build, a .exe file is created. It should be in either your Debug/Release directory under the project directory.


Exporting c++ output into excel?

I was wondering if someone could explain how I can go about transferring output from c++ program code into excel and vice versa. All the information I have found on the internet relates to Microsoft Visual Basic and it does not make much sense as I am using a Dev C++ compiler.





Any help will be greatly appreciated!!!

Exporting c++ output into excel?
You could use a .csv file - which is comma seperated values.





Each cell is seperated with a comma, and each row is ended with a CR ( endl).


Here is a simple example





#include %26lt;iostream%26gt;


#include %26lt;fstream%26gt;








using namespace std;








int main(int args, char * argv[])


{


ofstream MyExcelFile;


MyExcelFile.open("C:\\example.csv");





MyExcelFile %26lt;%26lt; "First Name, Last Name, Middle Initial" %26lt;%26lt; endl;


MyExcelFile %26lt;%26lt; "Jack, Nimble, B." %26lt;%26lt; endl;


MyExcelFile.close();


return 0;


}





You can look up more information of Csv format at


http://www.creativyst.com/Doc/Articles/C...

cosmos

I need a c++ program to display the ascii and extended ASCII table (as one table).?

I use turboc2 c++ compiler and i need this program that works in this compiler...

I need a c++ program to display the ascii and extended ASCII table (as one table).?
I'm not familiar with the turboc2 c++ compiler, but if I wanted the ASCII table I would do:





#include %26lt;iostream%26gt;





int main()


{


for (int i = 0; i %26lt; 256; i++)


{


std::cout %26lt;%26lt; i %26lt;%26lt; ": " %26lt;%26lt; (char)i %26lt;%26lt; std::endl;


}


return 0;


}


Is there any way I can get Dev-C++ to work on vista?

I have vista and I got this book that teaches you C++ but I need the Dev-C++ compiler. I tried Microsoft Visual C++ Express but it was hard to use since I'm a beginner. Can I get Dev-C++ to work on vista? Are do you know of any other compilers that are very similar to Dev-C++ that work on vista?

Is there any way I can get Dev-C++ to work on vista?
Have you tried Borland?


Switching from standard C++ to visual C++?

I have done all my C++ coding on the Bloodshed Dev C++ compiler.


Some ppl use visual C++ as well..... can i learn is it all the same





i.e. what are the differences in using visual C++ software?


how can i learn V-C++?

Switching from standard C++ to visual C++?
both are compilers and hope the compatibility too
Reply:C++ for the most part is universally the same...however there are new layers added ontop that makes learning Visual C unique (never used Bloodshed Dev before though)..in that new things you will learn will be about making applicatons for windows which include things like MFC or message events and handlers. By you coming off an experienced C++ background it shouldn't be too hard to jump in.





The IDE of Visual Studio is truly a god send (in my opinion) ... i recommend you also get Visual Assist to go along with it...awesome duo.
Reply:i used Turbo c++ and and visual c++. Earlier, i thot vc would be boring.. But its awesome. So, go for vc++ anymore.


C++......................?

is there a less complicated c++ compiler than microsoft express 2008? i found it to complicated and hav found no other free program to make a fps. a tutorial on c++ game making and the easyier program would be appreciated. and if there r other programs then tell me (10 points)

C++......................?
So true Michael J, so so true.





But to answer the question: The easiest C++ compiler out there is Microsoft Visual C++ 6.0 (Or you could use Microsoft Express if you don't wanna shell out the money). All you have to do to compile it is write the code, debug it by pressing F4, and then run the program by pressing F5. Simple as that. Then again, if you meant that it is a complicated compiler because the code YOU have to learn and YOU have to write is difficult then hey, your assed out bud.





#include %26lt;iostream%26gt;


using namespace std;





main()


{


char myChoice;





cout %26lt;%26lt; "(a) I will persevere! \n(b) I will cease learning! \n";


cout %26lt;%26lt; "%26gt;%26gt;%26gt; ";


cin %26gt;%26gt; myChoice;


myChoice = toupper(myChoice);





while(isalpha(myChoice)){


if(myChoice == 'A') cout %26lt;%26lt; "Good for you! " %26lt;%26lt; endl;


else cout %26lt;%26lt; "Goodbye, never talk to me again. " %26lt;%26lt; endl;


}


}
Reply:I use DEV C++ by bloodshed development. It's quick, doesn't slow down my system. Works for my needs. Report It

Reply:I personally never liked Expressed, it was too slow and a lot of the options and preferences are just unnecessary.





I use Microsoft Visual Studio v 6.0. i hope that helps.
Reply:You can't figure out a simple compiler, yet you trying to create FPS game? Good luck, buddy.

online florists

Why is ASM faster than C code?

The compilers all transform them into bytecode, don't they? Is it that the ASM compilers are just better than the C compiler?

Why is ASM faster than C code?
Starting with the caveat that not all asm programs are faster if they are not written by good asm programs then...





Yes, some hand asm code may be better than the best compiler optimized code. But beyond that C is written to a language standard that takes into account many different machine architectures and certain semantic guarantees. Honoring those may disallow using certain processor features that a particular asm program could potentially use because it is not operating within those constraints.


Compiler Error Message: BC31019: Unable to write to output file 'c:\windows\microsoft.net\fram...

The file must be in use, because it is located in Windows folder.

Compiler Error Message: BC31019: Unable to write to output file 'c:\windows\microsoft.net\fram...
are you running Visual Studio.net?





This was a response I found by someone else:


try searching for the dll file --%26gt; xoa7-gmz.dll


And see where it is on ur PC


http://thedotnet.com/nntp/355953/showpos...


C++ on palm?

is there a program to write programs in c++ ON the palm, as in actually write the program on the palm instelf, theres a BASIC compiler i use on it, but i was wondering if there was a c++ compiler

C++ on palm?
Yes, there is a C++ compiler. Look at:


http://www.internetnews.com/dev-news/art...
Reply:hmm I wouldn't count on it but that would be pretty sweet :P


Difficulty in C++ program?

hi i have a problem in C program ..


i m new to C .. help me





#include %26lt;iostream%26gt;





int main() {


std::cout %26lt;%26lt; "help";


return 0;


}





what is the problem with this program


i m compiling it with turbo c++ compiler 3.0


and it gives me three errors





unable to open iostream file


std must b a class or struct


statement missing ..





tell me waht is the problem with this program .or this is the problem with compiler

Difficulty in C++ program?
Which turbo C++ is that? The ancient DOS version?





iostream.h


remember .h





cout%26lt;%26lt;


No std::
Reply:stdio
Reply:This link to Turbo C++ compiler 3.0 might help trouble-shoot that:


http://www.codepedia.com/1/TurboCppHello...


Good Luck.
Reply:this compiler is not full or you forgot to type file extension behind "iostream", try finding it and getting its extension
Reply:first it's "iostream.h"


I believe that you must first call the std lib





do this by putting "using namespace std;" after your include
Reply:Yeah you can either add the ".h" extension like everyone said, or you can leave that off and stick (on the next line) "using namespace std;" (without the quotes). Also you don't need the "std::". Just say "cout %26lt;%26lt; "help;"" By the way, I like to stick a "%26lt;%26lt; endl;" at the end of all my couts. It makes your program prettier (like hitting enter). So here's what it should look like:





Either,





#include %26lt;iostream.h%26gt;





int main()


{


cout %26lt;%26lt; "help" %26lt;%26lt; endl;


return 0;


}


OR





#include %26lt;iostream%26gt;


using namespace std;





int main() {


cout %26lt;%26lt; "help" %26lt;%26lt; endl;


return 0;


}





It really depends on the compiler. It may take either, or it may only take one of them.
Reply:Turbo C++ 3.0 for DOS is from 1991. That's sixteen *years* ago, long before C++ was even standardized as a language. Turbo C++ 3.0 predates Boris Yeltsin as Russian President. There's a whole lot of perfectly legal, standards compliant code that isn't going to work in that ancient monstrosity.





If you get a modern compiler, you'll find your problem has disappeared. For windows, consider MSVS 2k5 express or Borland C++ Builder; for unix, use whatever's already installed, probably GCC. (Given that you're using a DOS compiler, extensive unix conversation seems wasted.)





Free, standards compliant, and packaged with a first class debugger:





http://msdn.microsoft.com/vstudio/expres...

flowers uk

C++.........which on is the better version of c++........?

1.Borland's Turbo C++ Explorer,


2.Microsoft's Visual C++ 2005,


3.Open Watcom C/C++ Compiler


i want to learn c++,please tell me a good website,which version should i have ?

C++.........which on is the better version of c++........?
I would personally recommend GCC's g++ which is free and open source. I don't know much about 1 and 3 but be very careful with VC++ as it can teach you very bad habits and does alot of things in a very nonstandard way. It does have a nice interface though :p


[1] is a version of GCC that will run on windows.
Reply:microsoft visual one is a good one.
Reply:Of those three, Microsoft's Visual C++ 2005 is by far the largest, most dominant, and best supported IDE. There are a few answers here telling you to use open source environments--I suggest you do NOT use the open source ones until you are more comfortable programming. While they have some nice features, the user interfaces often leave a lot to be desired.





One of the arguments against Visual C++ is that it costs money. This is no longer true: Visual C++ 2005 Express Edition is now free of charge. It does leave out a few features, but they're not anything you're likely to miss (MFC support, anyone?). Note that you may want to download and install the "Windows Platform SDK" as well, but that is also free.





One other answer also commented that Visual C++ is non-standard and can teach some bad habits. If you use the .Net mode then this is true (you will be given the option of whether to use .Net when you create new projects). The C++ used for .Net has many custom extensions that only Microsoft uses. When you are using normal C++, however, they have a very good standards compliant compiler (roughly equal to G++ on standards, and with much better optimization).
Reply:i recommend you visual c++, and you can simply go to the microsoft developer center of visual c++ to study, and they recommend you a lot a associated community website for asking questions


search the keyword


microsoft developer center visual c++


the software is downloadable from microsoft official website
Reply:For a begginer





Borland C++ is advisable





and you can easily run and learn





no need of much configurations in it..





All the best
Reply:srry i dont get
Reply:Go with DEV C++. Simple to use IDE, it's free, and for a begginer you can put it on a usb drive and carry it with you.


C++ Help (try - catch)?

I am unable to use try-catch statements in turbo C compiler, it does recognize 'try' key word.


i tried in the help section but there is no such keyword as try.


is this feature available in Turbo C compiler, if not which compiler i shld use?


Pls help

C++ Help (try - catch)?
Try...Catch are fairly recent developments in C/C++, and may not have been supported in older versions of Turbo C. I'm not even sure they're supported in C itself, period.





Microsoft Visual C/C++ Version 7 does have some support for them.





Hope that helps.
Reply:I thought those are Java code


C++ compilers?

I am running an intel dualcore2 machine and using gcc ( ubuntu linux ) to do a c++ program. Is gcc making full use of the both cores or is it just using the one?


I ran the same thing in windows, and windows was 2min33sec while gcc was 53sec


thanks

C++ compilers?
He's probably not making full use or any use of the both cores ( its hard to say for sure because other things might slow down the execution of the program ). The compiler needs to be optimized to do that otherwise it'll work with a single core.


HOW TO COMPILE C PROJECT 3000+ LINES IN GRAPHICS MODE, IN TURBOC COMPILER. Error returned is LINKER ERROR?

Make sure that the C compiler has been installed properly. Also make sure that all the header files are in place.

hamper

C++ Compilers? which one to use?

which one to use? i used to know one compiler with real good examples for every function in help menu. but i cant find it now


:(


which one is most commonly used? or which one is good for beginners who need pure code examples for every function, not just definintions :(


help!!!

C++ Compilers? which one to use?
Compilers don't have help menus.... I think you are confusing compilers and IDEs.... An IDE is an Integrated Design Environment - that means it has a code editor, help menus, compiler, debugger, and all that jazz.





Borland are currently providing Turbo C++, an excellent free C++ IDE. I have used Borland products for years and find them very reliable. There are almost certainly other similar products around - search for IDEs rather than compilers though, as a compiler is only one part of the IDE which seems to be what you are talking about.
Reply:Here you can download Turbo C++





http://dn.codegear.com/article/images/21...


Help!!! I need to get a compiler......?

Can someone give me the link to where i can get a good C++ compiler for FREE ?


, thanks ppZ

Help!!! I need to get a compiler......?
http://www.thefreecountry.com/compilers/...
Reply:Spend a few minutes with google and you'll answer your own question. This is an area for YAHOO GROUPS questions, not begging for illegal software. If you want something for free, invest a little time like the rest of us and *research*.


C C C C C C C C C C C C C C C c?

I'm using a Xp and turbo c++ compiler and now


void main()


{


int i = 1,j = 2;


printf("%d %d");


getch();


}


when i run the above program the output is





2 1


why??

C C C C C C C C C C C C C C C c?
The program invokes undefined behaviour, anything could happen.





My guess is that what is happening in this case is that as both i and j are local variables they are being created on the stack and when printf is called a pointer to the format string is also created on the stack then the printf function is passed a pointer to that entry.





Now printf is a varargs function and it reads the first argument as requiring two further integers, which it is expecting to find on the stack, but (Because they were not created at function call time (but printf has no way to know that)), it pops the first two available arguments off the stack and prints them.





However this is not required behavious and in fact the behaviour may even change from one run to the next.





Regards, Dan.
Reply:Because you're formatting as a double instead of an integer seems the most logical answer. It's been a long time for me and I never liked C but I had Turbo C once.
Reply:ur program shd be like that


void main()


{


int i=1,j=2;


printf("%d %d",j ,i);


getch();


}


then o/p is like that:-


2 1


else in my thinking there shd be no o/p
Reply:This code will print two random integers on the stdout. printf("%d %d",i,j) will print 1 2 and printf("%d %d",j,i) will print 2 1(simply because this is the output you requested!).
Reply:Compiler dependent...
Reply:You need to tell it which variables you want it to print i.e %i or %j
Reply:You should be getting 19.


Wht is the 16bit compiler?

what does the term 16 bit stand for in a c compiler???

Wht is the 16bit compiler?
Intel CPUs were originally 16 bit machines. When 32-bit CPUs were released they ran in a new 32-bit mode, but were still able to switch to the original 16-bit mode so that they could still run all existing software. Programs that are written for 16-bit mode will run on machines with both 16-bit CPUs (i.e. the 80286 and earlier) and 32-bit CPUs. Applications compiled for 32-bit mode will only run on 32-bit architecture. 16-bit is now obsolete, so you should always compile for 32-bit; it's both faster and gives you access to a far greater memory address space.

bloom

Where can I find info on C++, including info on how to use a compiler? I am a COMPLETE novice, I need BASICS!

I know nothing about anything having to do with computer programming. Online would be most helpful, but even books. Thanks.

Where can I find info on C++, including info on how to use a compiler? I am a COMPLETE novice, I need BASICS!
I'd recommend searching Yahoo or Google for C++ projects or tutorials. As for books there is a book called Learn C++ in 21 days, it goes over different things and gives you a project to do every day for 3 weeks. I really enjoyed it. The links below take you to some stuff I've found helful. I'm pretty sure a manual comes with the compiler download however I'm not on my PC right now so I'm unable to tell. Hope this info helps.





Bloodshed Software





Compiler Download: http://www.bloodshed.net/devcpp.html


Tutorial: http://www.silicontao.com/ProgrammingGui...
Reply:first dont worry about learning c++, you need to learn to programme, find a book on UML, that will help (Very boring) then get any programming books you can find in java or C++ and learn from there.





here is a cool like to help you start of.


http://www.fredosaurus.com/notes-cpp/ind...
Reply:There are a lot of resources online to learn about computer languages and how to use a compiler , you can search online for a free complier and free info on the complier.





If you are running windows 2000,xp or vista Microsoft has a really good free complier called Express edition you can legally download the software and use it for free the visual studio express has C++ C# java and Visual basic.





I have a few links for you to look at.





Good luck and have a lot of fun!!


Can you please refer me a free compiler with opengl support?

I am looking for a compiler of C genre, i.e. C/C++/C# compiler, thats free and has built in opengl support. Please tell me one.

Can you please refer me a free compiler with opengl support?
As the other answerer has said, you need to get a compiler, then get the opengl library to fit it.





As you seem to be a beginner, you get the OpenGL Utility Toolkit (GLUT). It is available here:


http://www.opengl.org/resources/librarie...





Other resources can be found here:


http://www.opengl.org/resources/





Info about it can be found here:


http://www.opengl.org





Glut for win32 can be found here:


http://www.xmission.com/~nate/glut.html





For a compiler, I can provide 3 choices.





Borland Free 5.5 C++ Command Line Compiler (GLUT works with this)


Info on it


http://dn.codegear.com/article/20633


Download here


http://www.codegear.com/tabid/139/Defaul...


Click on 'Compiler'. You may also want the additional information to the right of the first page.





Borland Turbo C++ Express


Info


http://www.turboexplorer.com/cpp


Download


http://www.turboexplorer.com/downloads





MicroSoft Visual Studio Express


Info and download


http://msdn.microsoft.com/vstudio/expres...
Reply:No compiler has built in OpenGL support, but nearly every compiler has a library written that uses OpenGL (C, C++, C#, VB.net....). All you have to is pick a language, get its compiler, and then get the library to interface with OpenGL.


How to make compiler use swap space in solaris? It is only using physical memory.?

The Solaris 8 machine is having 2GB of physical memory and 6 GB of swap space. However, the C++ compiler (Sun ONE Studio) is not using the swap space. It uses only physical memory. When the compilation requires nearly 3GB (due to exe size), it ends up throwing memory error instead of using the swap space. What is forcing Solaris not to use the swap space while compilation? What options can be enable to make it use swap space?

How to make compiler use swap space in solaris? It is only using physical memory.?
You've misdiagnosed the problem; it is not an issue of


the compiler "not using swap". Do note, also, that any


32-bit process can *never* exceed 4GB since that's


the theoretical upper bound of the address range (2^32).





I don't know why the compilation stops at 3GB, but even


that is a lot bigger than you'd normally see. Are you sure


it's actually growing that big? Use "/bin/prstat" to watch


the SIZE field for each sub-process in the compilation.


For a long-running process, you can look "inside" it


using "/bin/pmap -x PID" (where PID is the process ID


of the process you're looking at). I just realized that


if you're running out of heap space, it *could* be because


your "stack" user limit is big (ie. 1GB). Check with


"ulimit s" (for ksh/bash/sh) or "limit stack" for (csh/tcsh).


It *should* be something reasonably small like 8192 KB.


If it is large (ie. 1000000 KB), then reduce it down so that


the heap has room to grow.





The thing is, 3GB is *huge* for a compilation. You


might consider turning off the debug option for some


of the files to see if that helps. Alternatively, it's


possible that you've hit some bug in a phase of


the compiler (ie. the optimizer) which grows too


large on the particular source you've given it. You


might consider dropping the optimization level on


that particular module to see if you dodge the problem.





Also, if you're linking with other software, you're right that


you can't switch away from the Sun compilers because


Sun and GNU use different ABI's for C++. However,


you very well might be able to upgrade to a current


release of the Sun compilers because they maintain


backward compatibility. Version 8 is *many*


years old, and the new compilers are not only


improved (faster, better code, bugs fixed), but you


can use them for free (and you don't have to mess with


licensing). See:


http://developers.sun.com/sunstudio/down...





If you really go on an upgrade binge, the same


can be said for using Solaris 8 vs. Solaris 10.


Keep in mind that Solaris 10 is open source and


you can use it for free.





Finally, if you need help with the Sun compilers, you


should go to the Sun help forum. YA is great, but the


Sun tool forum does *nothing* but answer questions


about the Sun compilers/debugger/analyzer. That level


of specialization is tough to beat for a specialized


question. See:


http://forum.java.sun.com/index.jspa?tab...
Reply:Try using g++ instead of the Sun compiler.


Is this a 32-bit or a 64-bit system? Is the CPU a Sparc, x86 or x86-64?


How to let the compiler know if the variable is static.in c?

declare it as static,


// static1.cpp


// compile with: /EHsc


#include %26lt;iostream%26gt;





using namespace std;


void showstat( int curr ) {


static int nStatic; // Value of nStatic is retained


// between each function call


nStatic += curr;


cout %26lt;%26lt; "nStatic is " %26lt;%26lt; nStatic %26lt;%26lt; endl;


}





int main() {


for ( int i = 0; i %26lt; 5; i++ )


showstat( i );


}

dogwood

How to let the compiler know if the variable is static.in c?(i am not asking how is declare & use statatic)?

The declaration tells the compiler the variable is static. That's why it's called a declaration.





Hope that helps.

How to let the compiler know if the variable is static.in c?(i am not asking how is declare %26amp; use statatic)?
You use keyword "static" before the variable.


Help me my compiler dose not run?

when i run my programe


awindwo appears:








**** Build of configuration Debug for project rag ****





make all


Building file: ../rag.cpp


Invoking: Cygwin C++ Compiler


g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"rag.d" -MT"rag.d" -o"rag.o" "../rag.cpp"


Finished building: ../rag.cpp





Building target: rag.dll


Invoking: Cygwin C++ Linker


g++ -shared -o"rag.dll" ./rag.o


Finished building target: rag.dll

Help me my compiler dose not run?
There is no error message so it's doing what you are telling it.





Section 1 Compilation Stage - it's compiling rag.cpp correctly and creating the object file rag.o





Section 2 Linker Stage - the linker is using the object file and correctly creating the target file rag.dll





A dll is a dynamic link library file and is supposed to be used with the actual executable program which I assume is awindwo.exe.





I think you need to look for another makefile that builds the executable file as you seem to be calling the makefile for "project rag" which only makes the dll.


Help me my compiler dose not run?

when i run my programe


awindwo appears:








**** Build of configuration Debug for project rag ****





make all


Building file: ../rag.cpp


Invoking: Cygwin C++ Compiler


g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"rag.d" -MT"rag.d" -o"rag.o" "../rag.cpp"


Finished building: ../rag.cpp





Building target: rag.dll


Invoking: Cygwin C++ Linker


g++ -shared -o"rag.dll" ./rag.o


Finished building target: rag.dll

Help me my compiler dose not run?
There is no error message so it's doing what you are telling it.





Section 1 Compilation Stage - it's compiling rag.cpp correctly and creating the object file rag.o





Section 2 Linker Stage - the linker is using the object file and correctly creating the target file rag.dll





A dll is a dynamic link library file and is supposed to be used with the actual executable program which I assume is awindwo.exe.





I think you need to look for another makefile that builds the executable file as you seem to be calling the makefile for "project rag" which only makes the dll.


I am learning C, what suggestions for a good editor and compiler?

Since these are necessities I'd like to get what has been good for others, so: lay them on me!

I am learning C, what suggestions for a good editor and compiler?
when i started c I used TURBO C++ compiler


later i switched to Borland and Microsoft Visual C++





i suggest u start with TURBO


it has a good help section to help u with most symbols,syntax,fuctions etc.
Reply:Normally at most universities Borland C compiler is used. This has a dos like interfaces, but its quite simple to used.





I recommend that u use Visual C++ to compile your c program. Remember to use:


int main()





and to





return 0;
Reply:Borland C++
Reply:Very good freeware editor is Bloodshed Software - Dev-C++ you can get it here http://www.bloodshed.net/devcpp.html but for professional purposes you will need either Microsoft Visual C++ or C++ Builder from Borland (very easy and fast developing)
Reply:microsoft visual c++ works good for me http://msdn.microsoft.com/vstudio/expres...
Reply:in linux either gmac or kate editor and gcc compilor.


if u r on windows, get linux.
Reply:Well... the best is obviously Microsoft Visual C++ (I'm using Visual c++ 6.0, but there are newer versions available). The editor and compiler are simply amazing and very easy to use.


This costs a lot, but it's the best you can get nowadays.





However, if you want to go for a lighter version of this, you should try Borland C++, it's a bit older than Microsoft's compiler and editor, but it's cheaper too :).





There are a few free compilers/editors online. Visit http://www.thefreecountry.com/compilers/... for more details.

redbud

Which compiler should i load ?

actually , i m using windows xp and have turbo C compiler ,





but the header files like "include%26lt;sys/socket.h%26gt;" incluse%26lt;netin.h%26gt;" and many other headers files are not availble





due to which i m not able to write C programm that uses these header files ,





so cn u tell me which complier should i load , in my machine , so that i get these headre files





plzz tell me , thanx in advance

Which compiler should i load ?
Try using Microsoft Visual C++ compiler. then during installation do a 'complete' installation.
Reply:its up to u


Saturday, May 22, 2010

What is the other way to do this........in c.........i m using gcc as a compiler?

file(double (*f)[ydim][9],double (*feq)[ydim][9])


{





FILE *fp1;


fp1=fopen("Values1.txt","w");


if (fp1=NULL)


{


puts("Cannot Open File");


exit(1);


}





printf(fp1," %lf %lf ",%26amp;f[xdim][ydim][9],%26amp;feq[xdim][ydim][9])...





fclose(fp1);





return(0);


}











the values to the two 3d arrays are given in previous functions

What is the other way to do this........in c.........i m using gcc as a compiler?
I guess you wanted to use fprintf.


Also any multidimensional aray is stored contiguously in memory.So you can write





fwrite((void*)f,sizeof(float),xdim*ydi... got this 10 from the fact u used 9 for the 3rd index*/,fp1);


This will write the array into the file.


Using the g++ compiler, what is the difference between compiling C++ code with -Wall and -Werror?

They are not related. -Wall enables a lot of warnings for picky, easily avoided details that some want and some don't want. -Werror turns all warnings into errors to keep a compile from succeeding if there are any warnings or errors.


What does a compiler do while doing compilation of a c progranm?

Essentially a C-compiler converts a C-program into something which machine can understand.





visit wikipedia for more details http://en.wikipedia.org/wiki/Compiler

What does a compiler do while doing compilation of a c progranm?
A compiler is a program which converts the code written high level language to low level language (Machine Language). A C compiler first converts the c language source code to a file with .obj extention. Still not done. Then the linker links this code with the library files and makes the file output that is an EXE file.
Reply:Compiles your source code.





Haha... it creates machine code from your C source code. Machine code is written in a specific instruction set understood by your computer. It's much more complex than straight text source code.
Reply:A compiler is just a program that converts your written code into machine code or another form of code.

sundew

Is C++ case sensitive or Case sensitivity is compiler-determined?

C++ is always case sensitive on all compiler

Is C++ case sensitive or Case sensitivity is compiler-determined?
Ye.





C,C++,Java are case sensetive.





A variable declared as EmpName is diffrent then empname and EMPNAME in C,C++,Java








It is not dependent on compiler it is by design.
Reply:Yes, C++ is case sensitive (and C as well)... so make sure you pay attention to your caps. If your compiler ignores case, then I suggest you get a different compiler because the one you have must be junk.
Reply:good question,





I think C++ is case sensitive, unless you have some really random complier that will compile some odly written code.
Reply:Case sensitivity is in the C++ standard (C as well). If a compiler is not case sensitive, then it does not conform to the standard, simple as that.


C++ Question: Is the purpose of the compiler to convert object code into source code?

No. The compiler converts source code into object code. The linker converts object code into executables.

C++ Question: Is the purpose of the compiler to convert object code into source code?
no, source code is what you write





compiler converts source code into machine code (stuff that the computer knows how to execute)


How do i check inputs against input types in c? i use gcc as my compiler.. thanks?

Maybe I don't know C as well as I sometimes imagine I do, but it sound like you are asking for two different things.





The C "equivalent" of Java's "public static int parseInt(String s)" is C's " int atoi(const char *str)", part of stdlib.h.





Is that what you were looking for?





If you are trying to type check inputs, that is something different (isn't it?)





This is a decent bit on input data validation (necessary because C is very weak on types).


http://goforit.unk.edu/cprogram/c_055.ht...


http://goforit.unk.edu/cprogram/c_032.ht...


Where can i download Java?(application builder).I know C++ i want the java program builder and its compiler?

where can i find it ? what is its exact name ? i want to learn it . i know C++...if u can provide a tutorial.thx for the answerers

Where can i download Java?(application builder).I know C++ i want the java program builder and its compiler?
Compiler:





http://java.sun.com/javase/downloads/ind...





Depends whether you want J2EE or J2SE. If you get JDK6 with Netbeans 5.5 you'll have the IDE.





Tutorial:


http://java.sun.com/docs/books/tutorial/
Reply:sun.com
Reply:I think you're looking for what is called an IDE, an Integrated Development Environment. Kind of like Visual Studio, but then for Java.


There are 2 major free Java IDE's you want to look at: Eclipse, and also Netbeans.


eclipse.org and I think netbeans can be found on Sun.


You'll also need the JDK (Java Development Kit). The JDK is needed for anything you want to do in Java. So download that first from java.sun.com


I think Sun has an all-in-one with the jdk and netbeans all in one, which might get your ball rolling.
Reply:You can probably find its original name on the site you download it from........http://www.java.com, and go from there...... I dont think I have the correct way of spelling it, because it didn't highlite after I did it.... HM? Need more information... try that anyway, to see where that will get you....It may bring up Google, and from google you can see what it is your looking for.......Good Luck to you, hun! Smile!

baby breath

Which compiler/environment to use to compile C programs?

If you're just starting up, I'd recommend Microsoft Visual C++ - its basic edition is free and can be downloaded from MS Web site:


http://www.microsoft.com/express/vc/





Eclipse is also good.


http://www.eclipse.org





I love Emacs, but suggesting it to a beginner is just bad advice.

Which compiler/environment to use to compile C programs?
linux is the best to practise C. Other compilers like turboc or so will generate a warning which you will be feeling as right.... But it would not be in case of linux. So start practising C in linux
Reply:Emacs!


Which compiler can I use for compiling c-programs in vista?Dev cpp and lcc-win32 didn't work for me.?

I have amd processor and windows vista ultimate operating system.In dev cpp even a printf("Hello World!\n"); this simple program didn't run.it was saying coul not generate makefile.win.

Which compiler can I use for compiling c-programs in vista?Dev cpp and lcc-win32 didn't work for me.?
This one :


http://www.microsoft.com/express/downloa...








As far as I know, Dev c++ is incompatible with vista.
Reply:Its not devcpp thats the problem here, its vista, again lol. anyway, whats happening is that vista is trying to force devcpp to install into some random directory, and devcpp doesnt like like spaces. Look at


http://sourceforge.net/forum/forum.php?t...

yucca

C++: how to implement gotoxy function in the compiler "Quincy 2005"?

programming in C++

C++: how to implement gotoxy function in the compiler "Quincy 2005"?
gotoxy (2,5 ) like taht
Reply:I dont know how to do in Quincy 2005





But gotoxy() function takes two arguments: X and Y co-ordinates.





its syntex is gotoxy(X co-ordinate,Y co-ordinate);


it directs the pointer to the respective ordinate.





moveto() is similar to it. it works on ordinary screen


Where can i get free ebook of learning c? what is the best compiler for beginner?

i am a beginner in programming.

Where can i get free ebook of learning c? what is the best compiler for beginner?
if you search C learning.pdf u will find a vey good pdf book about learning c.





i use Borland C and turbo C bouth of them is good.
Reply:Try this...?


http://en.wikibooks.org/wiki/C_Programmi...
Reply:This is my learning path:


C-%26gt;C++-%26gt;VC6.0 MFC(maybe it's outdated)-%26gt;.net C#


I think C is a great start.
Reply:try in





www.esnips.com





u may need to complete a quick registration there.


Please can someone enlist some good free C++ compilers for win98 ?

i hav already used dev c++ 4.9.9.5 %26amp; iam pretty unsatisfied. tell some other good free c++ compilers for win98

Please can someone enlist some good free C++ compilers for win98 ?
The GNU Compiler collection includes one. http://gcc.gnu.org/





The express edition of Microsoft's package is free http://msdn.microsoft.com/vstudio/expres... - but I'm not sure if it is supported by Windows 98.


Please can someone enlist some good free C++ compilers for win98 ?

i hav already used dev c++ 4.9.9.5 %26amp; iam pretty unsatisfied. tell some other good free c++ compilers for win98

Please can someone enlist some good free C++ compilers for win98 ?
The GNU Compiler collection includes one. http://gcc.gnu.org/





The express edition of Microsoft's package is free http://msdn.microsoft.com/vstudio/expres... - but I'm not sure if it is supported by Windows 98.

chrysanthemum

What edit should I use for c++ that also comes with compiler?

Try bloodshed dev. it's free and very efficient, u can download it from,


http://www.bloodshed.net/devcpp.html





Let Google be with u!

What edit should I use for c++ that also comes with compiler?
I use Visual C++ 6.0 Enterprise Edition.
Reply:if on windows, you can use MS's "express" editions of their IDEs (integrated editor/compiler).





if on linux, use emacs, vi, kate, or any other editing program, and the good ole g++ compiler.


I' Learning how to program in c++ and i need a compiler...is the microsoft one any good?

nope, go with bloodshed c++ (dev-c++)


it can be found here


http://www.bloodshed.net/dev/devcpp.html


download the beta 5.2 from sourceforge


its a great one

I' Learning how to program in c++ and i need a compiler...is the microsoft one any good?
I would suggest learning it in Linux where you can use the g++ compiler. But if you want to stick to windows I would suggest the microsoft compiler or Borland compiler. Both are free.
Reply:Yeah you got the Visual C++ .NET 2005 edition that is a free IDE, you also have some smaller IDE's like the Dev C++





http://www.bloodshed.net/devcpp.html





You might find the one from DevCPP a little easier to work with at first depending on what your doing, the C++ IDE from windows is better, but its also a bit more complicated.
Reply:As others have stated, Dev C++ from bloodshed is probably the IDE and compiler you want to use. The compiler used is actually the gcc/g++ compiler used on just about every platform around. If you are just learning and not sure if you really and to be a computer programmer, Visual C++ is very expensive.





There's also the fact that NOTHING Microsoft makes ever follows standards (You can't lock people into using your crappy software that way). So if you learn the Microsoft way of programming, it may not work on a more standards compliant compiler like gcc.





Good luck.
Reply:Turbo c++ is useful and most frequently used compiler or use microsoft borland for more effective and upgraded version.
Reply:If you're learning, it might be best to start with something that doesn't get in your way too much, and yet is easy to use.





In Windows, Microsoft's %26lt;a href="http://www.microsoft.com/express/v... C++ Express Edition%26lt;/a%26gt; is completely free and with no restrictions on what you can produce or distribute. This, I predict, will be a very easy compiler for you to use, but some of the starter templates (e.g. Console Application) may give you a lot of extra code by default that you don't need.





In Windows you can also download %26lt;a href="http://www.cygwin.com"%26gt;Cygwin%26lt;/a%26gt;, which can install the free and widely-used gcc compiler (make sure you select gcc from the Cygwin install program (under the "Devel" node in the packages tree)!).





If you're in a Unix (e.g. Linux) system, I recommend using gcc :-)





Take care, and good luck!





If you're on a UNIX


How do I run my first C program with the DM compiler?

Hello,





I found this tutorial for the Ditigal Mars (DM) compiler. Under the section 'Testing an Application' they tell you how to set the compiler options (if applicable) or command line arguments and get going.





http://www.digitalmars.com/ugr/chapter8....


Are there any c++ compilers for palm?

are there any c++ compilers for palm so i can write programs on my palm

Are there any c++ compilers for palm?
its not C++ (its C), but one that is very good is "Codewarrior for palm os"
Reply:http://www.palminfocenter.com/news/5976/...
Reply:Microsoft VC++ Express can target palm, I believe, as long as palm support .net Compact Framework, MFC or ActiveX. If you're clever, I think you can customize the VC++ solution to output palm compatible code.

daffodil

How to compile a .c file using Digital Mars Compiler?

Really precise directions please...as if talking to a computer illiterate person...

How to compile a .c file using Digital Mars Compiler?
Start %26gt; Run %26gt; type "cmd program"


The program name is without extension.


How do i compile my c++,c program is thare any compiler where i can download it?

Visual C++ is available for free as long as you download it by November of this year and register it. It is a great IDE :-)





http://msdn.microsoft.com/vstudio/expres...





Good luck.

How do i compile my c++,c program is thare any compiler where i can download it?
http://gcc.gnu.org/
Reply:1)For compiling any c/c++ program use , " ALT + F9 "


to compile any program.


( or direclty use " ctrl + f9 " to compile and run the program.)





2) YOU can find the download link for a free compiler on the following website:-


wwww.borland.com


How can i install a C++ plugin into Eclipse (Java compiler)?

I don't think that you are programmer, and you really want to do it. Because you should know this without asking.

How can i install a C++ plugin into Eclipse (Java compiler)?
go to the main web site, and press "save target as"
Reply:if it has an update site, just do the following


select help-%26gt;Software updates-%26gt;Find and Install


then select "New remote site" and insert the url.


should be straight forward.


if not,


then just unzip to eclipse directory or plug-in directory


Where can I download a compiler and a debugger for free(c++ language)?

Want to learn c++!!!!





Help me..





Thanks

Where can I download a compiler and a debugger for free(c++ language)?
Browse this for list of downloads:





http://directory.fsf.org/devel/compilers...





Also check the head site, www.gnu.org. I guarantee you'll find anything you need.
Reply:go to turbo c site %26amp; search for what you want.you will get only obsolete versions of c %26amp; c++,but those are sufficient for learners!(learned c on one of them).


if you want an advanced version, you woulkd have to go to an underground site or illegel download site

hyacinth

In C when we write int i; does compiler reserve memory for i? What if we specify the storage class and define?

does compiler reserve memory when we declare


static int i;


register int i;

In C when we write int i; does compiler reserve memory for i? What if we specify the storage class and define?
In all three cases, the compiler will reserve memory for the variable. The register keyword will attempt to store on the CPU register which if not available will store the memory on the heap.
Reply:In all three cases, the compiler will reserve memory for the variable.


the static variable will store the value in the reserve memory till program terminates


The register keyword will attempt to store on the CPU register which if not available will store the memory on the heap.
Reply:"The register keyword will attempt to store on the CPU register which if not available will store the memory on the heap."





no, on the stack!


C++ Compilers?

Any good free C++ compilers for


1. beginners


and


2.advanced users?





thx

C++ Compilers?
Dev C++ from Bloodshed is probably the best, that or MingW Studio. Just google/yahoo search for them, they'll come up easily.
Reply:Use Borland's BCC or Turbo C++
Reply:Here are some good ones for advanced users:


http://www.microsoft.com/express/vc/ --%26gt; Microsoft Visual C++ '08


http://www.turboexplorer.com/ --%26gt; Borland Turbo Explorer C++


http://www.openwatcom.org/index.php/Main... --%26gt; OpenWatcom CPP Compiler.





For beginners, though, G++ in CygWin, Code::Blocks, or Dev-C++ (a little more advanced).





Good luck!
Reply:I would recommend Microsoft Visual C++ (2005 is free, don't get 2008). Try this link:


http://msdn2.microsoft.com/en-us/vstudio...


Bloodshed Dev-C++ is also free, but not as good.


Does c# express edition need a compiler?

Visual C# 2005 Express is a full development package. It includes


-Compiler


-editor


-Debugger


...

Does c# express edition need a compiler?
huh?!!


of course!


u can't develop C# programs without a C# compiler!!!
Reply:Yeap.in vb.net the compiler name is:"vbc"


i donna know what is in c#.


but u need a compiler.


but if u have .net framework 2.0 , u can develop asp.net without compiling and it works
Reply:Uh, I think you need some help with the definition of compiler......
Reply:u need CLR(call language runtime) for that


How is visual c++ different from regular c++ we use in turbo compiler?

Visual C++ allows for the use of Microsoft extensions, though you can turn these off.





Other than that, the IDE is pretty darn good, helps a lot when it comes to writing code.

poppy

Why does a compiler come out of program of c++ on its own without compiling and terminating the whole program?

i am using borland c++

Why does a compiler come out of program of c++ on its own without compiling and terminating the whole program?
There were probably errors detected in your code.


C++ compilers?

Can compilers like DevC++ and CodeBlocks do just as much as like Microsoft C++? I am wanting to try and learn a little C++ by myself, but i dont want to buy Microsoft C++, is there a need to?

C++ compilers?
I don't know anything about C++, but I use Java. Java is like C++ , I think you should check it out!!
Reply:The Microsoft Express versions are free.


Is Borelands Compiler different from turbo c++ in sence of source code & does turbo can't run in xp but in 98

Last I looked, Turbo c++ was a Borlan compiler.





Don't have a clue about the XP issue. Haven;t been folowing their upgrades (Borlan).


I need to make a little program on C++ or Fortran.. which compiler should I download?

You can download a free version of Microsoft's Visual C++ from the link below. If you register, you'll get access to a very useful ebook which will explain how to use the system.

I need to make a little program on C++ or Fortran.. which compiler should I download?
for fortran you can use salford plato

cosmos

I need to learn C programming but for that i need to install Turbo C or any other compiler in my system since

just now i bought the system i donot know how to install and work please anyone help meeeeeeeee in this regard so that i can learn quickly,Pleaseeeee with steps to install

I need to learn C programming but for that i need to install Turbo C or any other compiler in my system since
Hi!





First of all you have to download the the turbo c compiler you can download it from here





http://www.programfan.com/download/down....





file you will download is in ZIP format, you can simply let the windows zip utility to uncompress the file for you.... then click on Install FIle in the folder and it will launch the setup.





A word of caution tough. Turbo C(3.0) is not a standard compliant compiler, so i recommend you to download BloodShed Dev Cpp. it is based on GCC and is open source


You can download bloodshed dev cpp from here


Download page:


http://www.bloodshed.net/dev/devcpp.html





you need to download Dev Cpp with GCC/MinGw





if you have any problem this is the direct download link


http://prdownloads.sourceforge.net/dev-c...
Reply:use google to get a suitable compiler.





you can try freecountry.com for that.





Then install it.


Now your compiler is ready to use.
Reply:For Turbo C 3.0:


Double click on the executable "TurboC.exe" and it will automatically extract in the same/default folder.





If you don't have the compiler, then get GCC. You can install GCC compiler for C language in Cygwin. To do this, you need to install Cygwin in your computer. Mind you, Cygwin is a Linux environment for Windows.


http://www.cygwin.com/
Reply:gcc is free and probably comes with your OS already.
Reply:http://www.programmersheaven.com/downloa...


Go to the Above link and download the Compiler if you find a Zipped file unzip it if you find A Setup file you should install it or if you find many files then copy them to some directory and create a shortcut to your desired location..
Reply:Are you sure it's 'C', and not 'C++', C is more specialized, and the vast majority of people would (and should) be learning C++.





In either case, get the free Visual C++ Express Edition and work through whatever samples / tutorials you can find, if your on windows.





http://msdn2.microsoft.com/en-us/visualc...
Reply:you can go on google web download
Reply:Go to AT%26amp;T site and get the compiler for your trial