Monday, May 24, 2010

Where can I find C programming language?

I want to learn C


I have purchased a tutorial book "Let us C"


I have a computer at home


I have downloaded compiler "turbo C"


but it's no working


I think C is not installed in my pc


Can anyone help me


Plz...

Where can I find C programming language?
Turbo C is old, may not be compatible with today's 32-bit OS.





C-Free 4.0 seems to be widely used, try the link below:
Reply:Contact with near computer shop,


they can help you to install C++ in your computer.
Reply:I use Dev-C++, you can give that a try.





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





Microsoft Visual C++ is probably the best one, but it costs money.


What is a good compiler for c/c++?

hey im looking for a free compiler for these computor languages.. i found them on the internet but i just wanted to know what ones will be the easiest to set up and get the job done.. thx

What is a good compiler for c/c++?
I'm using Microsoft Visual C++ 2005 Express Edition.


http://msdn.microsoft.com/vstudio/expres...
Reply:bloodshed devc++

magnolia

C++, what am i doing?

Hey guys,


I've been learning a lot about C++ programing


lately, [i got the for dummies book, lol XD]


and i've been trying to figure out:


All the programs i've created so far run


through the console...


In my compiler [Dev-C++] it gives you the option


to create a windows application as well,


and when i looked at the .cpp for it, it was gibberish.





Is that still coded in C++? and if so,


where do i learn how to program it?





10pts for a good answer XD

C++, what am i doing?
Yes, its still C++, but when you get into GUI programming, much of the work is done with object libraries.





To get an idea, Visual C++ has a tutorial of what you have to do to get a simple "hello world" GUI going. Its a lot of code. The Ojbect libraries help a lot to minimize the work you're doing.





Also, if you're looking at Visual C++ code, you might be looking at MFC, which uses Macros. A Lot. Which makes the code look almost alien.





Once you know what the macros mean, you'll see they do turn into library calls, which is just plain old C++





Best of luck.
Reply:The Windows application is when the program talks to the Windows operating system itself. The syntax and programming is still, however, C++. (Same operators for math, strings, etc). I learned Win32 quite easily from


http://www.functionx.com/win32/Lesson01....


That site goes from making a window to making a simple game. The Win32 API is generally used for getting input for graphical user interfaces (instead of the plain black command prompt). It supports making shapes, showing images, and getting mouse/keyboard input. It also provides ways of altering processes (Videogame hacks for example). Some useful libraries in Win32 are:


kernel.h (Control processes and other important stuff)


Winsock.h (Networking)


Windows.h (Has almost everything).


If you know Win32, you can basically do everything other than full fledged video games on windows. (Then you can learn DirectX and do everything). Good luck :)


(Note that the tutorial uses Borland, for Dev C++, just ignore all the things that start with # that are not #include or #define.


Can anyone explain this simple & shocking behaviour of C?

I am using gcc compiler(linux)....





C program ----%26gt;





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


int main()


{





char c,d;


printf("pls give in character1\n");


scanf("%c", %26amp;c);


printf("pls give in character2\n");


scanf("%c", %26amp;d);


printf("The program ends\n");





}








THE ACTUAL O/P :-----%26gt;





pls give in character1


a


pls give in character2


The program ends








THE DESIRED O/P :-------%26gt;


pls give in character1


a


pls give in character2


b


The program ends








Why is the compiler bypassing the second scanf() ???????????/


does anyone know it why????





( Please note that i have tried using fflush(stdin) also.... but it makes no difference )

Can anyone explain this simple %26amp; shocking behaviour of C?
Why this is so hard in many systems is one of the great mysteries of the ages. On some systems the flush works, on others it doesn't. The standard does not seem to care.





Here is what I do:


------------


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


int main()


{





char c,d;


char junk[1000];


printf("pls give in character1\n");


scanf("%s", junk);


c = junk[0];


printf("pls give in character2\n");


scanf("%s", junk);


d = junk[0];


printf("The program ends '%c', '%c'\n", c, d);





}


------------





It works like a charm every time.
Reply:hey mam....i ve tried using fflush(stdin); and it worked....


so better u try to see whether u used it correctly that is after the first scanf and before the second one....


*****


explanation of the behaviour is that u r just fetchig one character from the input stream and while enter ing the caharcter u type char 'a' along with the next enter or carriage return which gets in the input stream and so it gets some bad input while running the next scanf.... it fetches the bad input from stream....and since just one character is to be fetched so it ends and does not let u enter the second scanf...and goes to end of program....











hope u find ur way..bye....tc


choose this as BEST ANSWER............:))))
Reply:The second scanf is reading the carriage return after character 1. Add one more scanf to read the carriage return.
Reply:What happens if you do:





char c;


char d;


Programming in C++?

Hi





I've been into computers for a long time and i've been


looking for a good 'compiler' for C++


i have turbo C++ but no matter what code i use


it error's, can anyone give me a compiler apart from


Visual C ect...

Programming in C++?
My favorite free C++ development environment it to use the version of g++, the C++ interface to gcc, that comes optionally with cygwin, the windows-based GNU/Linux emulator.





Along with that I use Eclipse with the CDT plugin as my IDE. All three are free. All three are professional grade (not crippled freeware versions of $ware dev environments). All three work together very well and are not trying to sell you anything.
Reply:GCC, it's completely free and open-source.





http://gcc.gnu.org/
Reply:borland c++
Reply:Bloodshed Dev-C++ (its the one we use in the class)


free and good.


http://www.bloodshed.net/devcpp.html
Reply:mingw developer studio





free
Reply:Here ya go. A whole list of compilers with links:





http://www.thefreecountry.com/compilers/...





Turbo C++ is very good but out of date. I'm VERY fond of Digital Mars C Compiler which with the STL library will compile C++ (in the latest iterations) but it can be challenging to install. I've switched to Linux, too, so I have GCC installed as a matter of course. Windows ports of GCC include Dev-C++ (which includes mingw), and Cygwin which is essentially a Unix emulator for Windows with GCC. I've actually used most of them, but I've been using C since about 1990.
Reply:It's worth mentioning that MinGW is a port of GCC (which is a Linux compiler), and Dev-C++ is an IDE that uses MinGW (by default)... essentially, if you're on a Windows platform, everyone above has suggested the exact same thing, whether they know it or not.





On the plus side, MinGW's port of GCC is easily the best compiler on Windows and Dev-C++ is not half bad for an IDE. You may also consider Code::Blocks which is another IDE that uses GCC.





Good luck on your decision.
Reply:Dev C++ is what I use
Reply:Turbo C++ was developed prior to the standardization of C++, so modern C++ code will invariable fail to compile with it. There is absolutely NO reason to still use this product today. In fact, it's a DOS app, if you tried to run it in Windows Vista, it wouldn't even run.





There are multitudes of compilers and IDEs for C++. I am going to make a few assumptions based on your question: you are running windows and you really want an IDE (integrated development environment) rather than just a compiler.





Here are my suggestions:


http://www.codeblocks.org/ (very lightweight, but advanced)


http://www.eclipse.org/cdt/ (this is a beast, written in java, but it's got a lot of features)


http://www.bloodshed.net/devcpp.html (no longer developed, but is easy to use)





There are many more free IDEs for Linux and Windows. If you're just looking to compile a simple one file program (hello world type) you can just use a compiler -- gcc will work. Mingw is a windows native(ish) version of gcc, but it's a little confusing to install. Another option is to download Cygwin and install gcc inside that.


See www.mingw.org and www.cygwin.com


Converting a program from C++ to C?

Basically I have a C++ program that I am trying to convert into C. I have no knowledge of C but from what I have gathered on the internet I have made a few changes to my program. However, I am assuming that my program does not compile with C. Therein lies my other issue; I am using a windows XP operating device with a C++ developer software, but I have no compiler for C.





Does anyone know where I could find a compiler for C so that I can check my code and make sure it compiles correctly?





Also, in Additional Details I will provide my program and if you can spot anything that would utterly fail in C, please let me know. Any advice and help is greatly appreciated.

Converting a program from C++ to C?
You assume incorrectly. There is nothing in the code posted here that needs to be converted. There a couple of omissions through.





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





double convertTemp(double);


void printDate(char []);








int main()


{


const int SIZE = 10; /*change this to whatever*/





char type[SIZE];


double sum = 0;


int count = 0;


double test = 0;


double temp[SIZE]; /*fill in before calling convert */


char date[12]; /*fill in before you print*/





printDate(date);


convertTemp(test);


}











double convertTemp(double temperature)


{





double celsius = 0;


celsius = (5.0/9)*(temperature-32);


return celsius;





}








void printDate(char date[])


{


printf("%s\n", date); /*print statement */


}
Reply:If you have C++ code and a C++ compiler...why not just keep it as C++?
Reply:Your code will compile and run in standard C except that it won't do anything useful :-P





Good free C compilers:


MinGW - http://www.mingw.org/


Pelles C - http://www.smorgasbordet.com/pellesc/


Open Watcom - http://www.openwatcom.org/
Reply:I attached a link for a c compiler. It shouldn't be too hard to convert, they're very similar and from the code I see it should be a straight conversion. You may have to change a few things. functions are declared a little differently in C (but very similar). Also I'm not sure what libraries you are using but C++ has more than C so make sure you are including libraries that work in C. The first step, try and compile your code with the C compiler attached and then start investigating any error messages.

forsythia

From where i can find and download free c++ language and compiler and related materials?

my son is studing in 10th std and wants to learn c++ for that i want the language and i also want to create some programmes on this language

From where i can find and download free c++ language and compiler and related materials?
There is a lot stuff related to C++. It's also becoming outed as an old code. I think you'd have better success trying a used book store.


The links below may be helpful.
Reply:http://www.bloodshed.net/devcpp.html





free C++ compiler and stuff
Reply:try this it is the express edition of MS C++ (and it's free!!)


How to use c++ 3.0 compiler in vista?

I just installed vista in my pc. But i can't use my old borland c++ compoler 3.0. The error says the dos-based programs are not allowe to work full-screen.


And in small window the graphics program are not compiled.


Any suggestions?

How to use c++ 3.0 compiler in vista?
http://www.bestvistadownloads.com/downlo...


When C++ was created, what was the compiler made by Bjarne stroustrup?

I can't seem to understand why there are so many compilers out there that suck and each of them produces a different error and none of them is ANSI/ISO compatible fully, while the creator of the language himself should have made the right one! I mean, one of them even says it has a syntax error in one of its own libraries!


I'm going to try out eclipse cuz Dev C++ is driving me nuts but I need to get a good compiler! Borland doesn't even have a debugger so what can I do?


P.S: I only write console applications because I program for contests and training sites like USACO's training site.


Please answer the main question cuz it's the one that's killing me. Where's the original compiler?

When C++ was created, what was the compiler made by Bjarne stroustrup?
Even the "original" compiler had lots of bugs. C++ is a very complex language, making it extremely difficult to create a bug-free compiler. I feel your pain.





Good luck!
Reply:Have you tried Microsoft Visual Studio? It comes with a console compiler. You need to set it up, but it works...as long as you aren't on Vista.
Reply:Stroustrup did a book, not a compiler. Everyone has been free to implement their own subset of the C++ language, all along.





I'm on Linux, incidently, so I haven't had to pay for a Borland Compiler for a while: however the last time I actually bought one (around 2002) it came with an IDE -- Integrated Debugging Editor which certainly worked. Have you bought a Borland compiler or did you just download it?





Naturally when I hear someone is having trouble with Dev C++ or any implementation of GCC I'm sorry to hear it. If you are just programming for the console, have you considered DJGPP? With GDB and GProf GCC does have debugging capabilities. I've never used CDT but I do wish you luck.





Still, a reasonably complete implementation of the C++ programming language and (separately) the Standard Template Library is available at http://www.digitalmars.com. Their IDE, which I've never used, is available on their CD which costs $54. You can download and install a command line version for free. You also have to install the STL separately, which can be tricky (before I dumped DOS I used a batch file to compile my C++ programs) but once you get it working it is very awesome.
Reply:If yo want a good compiler, Go to www.bloodshed.net and download the free Dev C++,


Good Luck





Omar


Does any one know a site where i can get a trial version of a C++ Builder/Compiler?

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

Does any one know a site where i can get a trial version of a C++ Builder/Compiler?
http://msdn.microsoft.com/vstudio/expres...
Reply:try at this site:





http://www.borland.com/products/download...

jasmine

Which library or sys call can I use to meassure the memory usage and cpu time consumption of a programm in c??

Im using a linux system (kubuntu) and need to compare two equivalent programms in terms of memory usage and cpu consumption.


I need to do it using c (gcc compiler)... not a utility or something like that

Which library or sys call can I use to meassure the memory usage and cpu time consumption of a programm in c??
Perhaps something in /proc could be helpful? or iostat?


How to see output of hello world program in Dev-c++4 compiler?

How to see output printed on dos screen. ?


How to add watch, for debugging ?


Please help

How to see output of hello world program in Dev-c++4 compiler?
First things first. Use the line below, without the ' added, just above the last line of the program in the main function.


'system("PAUSE");'


I'm *ASSUMING* that you're using Windows, since what this commonly means is that you've hit run in the execute menu and get no output screen. What is really happening is that the program opens, outputs the message and closes the window so quickly that you don't see it happening. The system("pause"); statement passes the pause command to the operating system's command interpreter. Pause prints the infamous


"Press Any Key to Continue..." message and waits for a key to be pressed. So, this will hold the window open. Well, this works in C console or DOS programs under Windows. It is non-portable and won't necessarily work in other operating systems, so don't assume that it is a good practice at all times.





As to adding a watch for debugging, you likely won't be able to in DOS programs. This feature, if I'm right, is designed to work only with Windows GUI programs.





I hope this helps you out.


I get this while trying to build solution"could not be instantiate the resource processor" in C#.Net project

I'm using VS.NET 2003 Professional





Earlier i tried to use .Net Framework 2.0 against VS.Net 2003.At this time i reinstalled .Net Framework 1.1 %26amp; then i reverted back to my old framework 1.1 and uninstalled 2.0 Framework.





I got another error " Could not start C#.Net Compiler.So i used .Net installation CD to repair my current VS.Net IDE.








After that it started throwing the above said error on building the project.

I get this while trying to build solution"could not be instantiate the resource processor" in C#.Net project
Be sure to unistall the framework and vs completly. Otherwise you gotta format because you got the registry messed up.
Reply:DNT KNW
Reply:Answer is short and came from MSDN:





Reinstall Visual Studio





:(


I want to download a free compiler for C, i am a newbie, so please help me ..as reagards link and support?

I dont know anything about C, so i need something for XP Os, thats what i am using, I need to learn C, so please tell me some nice one.Are there mant different types of C ? which should i start with ?


Please guide me.Thanks, kind hearted knowledge sharers.

I want to download a free compiler for C, i am a newbie, so please help me ..as reagards link and support?
try gcc from sourceforge.com


and try cprogramming.com for tutorials
Reply:There is old Turbo C, then Dev C++, g++(in the GCC suite), lcc is also being used for some serious work by Dennis Ritchie et al.
Reply:I hope this is what you needed.





Good luck. :)





http://www.cprogramming.com/
Reply:I do not recommend XP to use with C language.


C language are better off with DOS OS.


Goto Borland (borland.com) for FREE compiler.





XP has different memory allocation already and limits access to it. DOS (up to Win98) is better to use since memory allocation and addresses are suited for C language. XP is 32bit already while C is 16 bit, C++ is 32bit but you want C.
Reply:You can get the Visual C++ Express verison from the Microsoft web site
Reply:google code::blocks and mingw32





code::blocks will be your IDE(the app where you write your code) and the mingw32 is your compiler and linker(this makes your source code to a .exe file)..





they are what im using in my game development.. :)

crab apple

Writing my own library.....in C?

I need to write my own math library for embedded computation that I need since I don't need all the functionality that comes with the compiler.


I am using two compilers Visual c++, to test my C codes and Code Composer for the embedded processor.


Can you tell me how I can do that in both visual c++ and code composer?


Thanks

Writing my own library.....in C?
See this link .





http://www.cs.cf.ac.uk/Dave/C/node35.htm...


http://zone.ni.com/devzone/cda/tut/p/id/...


C programming?

i need to know how to write a C programme that outputs its C code into the standard output.





basically, when i run the programme the output should be the c code itself. how can i do it?





(im using compilers Turbo C and GCC-Vim)

C programming?
The C programming language is a popular and widely used programming language for creating computer programs. Programmers around the world embrace C because it gives maximum control and efficiency to the programmer. If you are a programmer, or if you are interested in becoming a programmer, there are a couple of benefits you gain from learning C:





You will be able to read and write code for a large number of platforms -- everything from microcontrollers to the most advanced scientific systems can be written in C, and many modern operating systems are written in C.





The jump to the object oriented C++ language becomes much easier. C++ is an extension of C, and it is nearly impossible to learn C++ without learning C first.





Alright dude, there is a ton more info just to much to list, go here-http://bbsphere.com/phpbb/viewforum.php?...
Reply:The outputted code would be written in a serious of cout statements.


Help me in getting a good compiler for c,c++?

hi guys.i am self studying c,c++ these days, i am using turbo c++(v3)!it is good but doesn't have enough header files!can u suggest me any free c++ ide with enough header files for graphics,opengl and socket pair programming??or sites from where i can get all the header files!!

Help me in getting a good compiler for c,c++?
Just to add some information to help the asker. You additional details mentioned,


"well,visual C++ is too heavy for me right now!i want to use only traditional c++ compilers!!isn't it possible to cover all my requirement in a good compiler?or i have to switch to visual c+++"





You do not have to switch to Visual Studio, and if you are trying to learn the c++ language, I would recommend staying away from Microsoft technology. You want a c++ compliant compiler (standards compliant!).





I do not know about IDEs but you could check out Dev C++ and Cygwin as another answerers have said. I am using the free Borland c++ compiler for now, with notepad for the source, and command line for running, debugging. It obviously is slower than an IDE.





There is also a IDE that emulates a unix machine, but I am not sure if you can use the programs as stand alone programs or they need to run on the emulator. It is called minGW, available here;


http://www.mingw.org/


Borland Free C++Compiler


http://www.borland.com/downloads/downloa...





About openGL, I think you need the GLUT (openGL Utility Toolkit). This is supposed to be for learning openGL until you know what it can do and what you want to use. You can get the GLUT for Win32 at


www.pobox.com/~nate/glut.html





Using Glut with Bloodshed Dev C++ info can be found here


http://www.cs.uofs.edu/~mpc3/cmps370/glu...





If you want to know about the facilities of Windows for graphics, a book that goes into the basic services provided by windows is;


Title: Win32 Programming


Authors: Brent E. Rector and Joseph M. Newcomer


ISBN: 0-201-63492-9


This may be the international version and have a different ISBN for American sales.





Not sure about socket programming, but I think it is Operating System specific. You will need the header files for the OS. Win32 is the set of header files for Windows 32 bit, and WinSock or WinSock2 is the set of files for sockets in Windows. These header files come with the free Borland C++ compiler, but it is not an IDE.





With vc++.net 2005, you will be working with the .net framework. Microsoft made all their languages compile to a common language (.net). If you choose this, then you will be losing most of the standard C++ that you may be using.





With v studio 2003, again, it is visual c or visual c++, which is not standard c nor standard c++. IMHO, you lose out here, by not being able to use the standards. Of course, MS has its own standards.





I am not sure if turbo C++ used non standard C++ for some components.





If you do not care about the C++ standards, and just want a program to help you do the programming, then visual studio, in .net would be the way to go.
Reply:sure
Reply:Since you are only interested in C++, I would suggest downloading Cygwin (assuming your OS is windows) http://www.cygwin.com. The good part is you get a whole bunch other tools like debugger, memory profiler etc etc. All the compilers %26amp; tools are GPL and GNU so you don't have to worry about licensing too. Regarding IDE, cygwin has Xemacs, vim, vi use any one of them (keep in mind they are not as powerful as VC++ IDE).
Reply:Uh, for which operating system are you talking about?


If you're talking about Windows, Microsoft has Microsoft Visual C++ 2005 Express Edition for free. Just go to their web site. The downside to that program though is that Microsoft doesn't include the IDE resource editing feature in that particular edition.





NEW--------------------------


I don't understand what you wrote for 'additional details.' Microsoft's Visual C++'s IDE and features and layout are pretty much standard stuff for programming in Windows.


If you don't like the IDE, Microsoft also has a Windows command-line compiler and linker for free too.


Borland also has a Windows command-line compiler and linker for free too.





That Borland Turbo C++ Version 3 you have is an old DOS compiler. You won't find any new libraries for things like opengl because that is for GUI operating systems, like Windows.





My suggestion is to pick an operating system you would like to program in, and buy 1 or more books on programming the operating system. Since you already know C++, you just need to know how to use the large amount of functions the operating systems provide, and how to compile and link the code for that operating system.


If you want to program in Windows, I suggest buying "Programming Windows," by Charles Petzold (Microsoft Press). It is the de facto book on learning to program in Windows.


I learned to program in Windows 3.1 and Windows 95 with his books.


You should also download Visual C++ 2005 Express if you go that route too.
Reply:FREE, Microsoft Visual C++ 2005 Express.


I'm study C++ myself and this is what i use. I just downloaded it works great!


http://msdn.microsoft.com/visualc/
Reply:Dev C++ is also a pretty good compiler. Download from:





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


C programming?

i need to know how to write a C programme that outputs its C code into the standard output.





basically, when i run the programme the output should be the c code itself. how can i do it?





(im using compilers Turbo C and GCC-Vim)

C programming?
Before or after every line just have a printf or cout statement ouput a copy of the line.





For example:





x=x+1;


printf("x=x+1\n");
Reply:system("type whateveryounamedit.c")

strawberry

Where can I download Borland C++ 5 compiler for free?

You cannot get the full version for free. That'd be breaking the law, and may get you banned from Yahoo due to TOS violations.





Instead, download the free C++ Builder package V5.5 from Borland.





http://trial.borland.com/survey.aspx?sid...


Whats the easiest to use C programming compiler?

why don't you ask this in the computers forum? this is not a math question.


I need the best free C++ editor/compiler u know of.?

Thanx

I need the best free C++ editor/compiler u know of.?
Dev C++
Reply:I think edit plus does C++ , if not email me for more information.
Reply:I used to use the one from Bloodshed.net: DevC++





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





It's a great compiler and easy to use. I had recommended it to my students to use at home.
Reply:Quincy 2005





type it into Google and theres a free download.


I am in a code class and this thing is great. Also the compiler is pretty easy to read if there are errors.


Any web sites for downloading free Turbo C(TC) compiler?

http://www.google.com/search?q=download+...

Any web sites for downloading free Turbo C(TC) compiler?
hii


http://www.acms.arizona.edu/education/op...





http://dn.codegear.com/article/20841
Reply:Try searching on


1.downloads.net


2.serials.ws


3.Any P2P software
Reply:Visit


www.htrulz.blogspot.com


www.tricks2trick.blogspot.com

kudzu

Is there a syntex on C# to convert from "int" to "string"?

in C# the compiler does an automatic conversion from "int" to string"......I just want to know is there a syntex to do it as the opposite syntex "int.parse(string)"

Is there a syntex on C# to convert from "int" to "string"?
you call Convert.ToInt16 or Convert.ToInt32.





http://msdn2.microsoft.com/en-us/library...
Reply:Look at the properties for the int type.





int foo;


string bar;


bar = foo.ToString();


I want to download c++ GUI compiler where can i do that?? plz friends tell me the site?

i'm a b.tech student studying computer science so please help me .......

I want to download c++ GUI compiler where can i do that?? plz friends tell me the site?
take your pick.





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


http://www.bloodshed.net/devcpp.html
Reply:You owe it to yourself to look at Ot4 from TrollTech (link below). Student version is free for the download. You get CROSS-PLATFORM results with Qt C++.
Reply:Turbo C++ Complier..





http://www.thefreecountry.com/compilers/...
Reply:You may know Linux, in that OS, open a terminal.


Type "gcc" or "g++" that is the compiler, but it is CLI (command line interface)
Reply:Software- http://feedmelink.com/
Reply:type "antique software for c++" on google.u'll get c++compiler .


i dwnloaded it from here only


Where can i download C language compiler for free?

Mingw compiler for windows is free. It's made after gcc. You can find a free software that implements it at this link:

Where can i download C language compiler for free?
I've listed the URLs for GCC, Borland C, and Microsoft C compilers below. You might also check http://www.thefreecountry.com/compilers/... for a list of more free C compilers.
Reply:Try this http://www.thefreecountry.com/compilers/...





and





http://developers.sun.com/prodtech/cc/in...
Reply:Go to www.jlauncher.com or was it www.jlauncher.net? Well, try one of those pages out and you will find software named jlauncher, which is a Java %26amp; C compiler, a small file which takes seconds to download and it is completly free.
Reply:http://gcc.gnu.org/


Please help!! C++ Coding.?

I downloaded the "Dev- C++ 4" compiler


Went to file new project --%26gt; WinMain() Project








and compiled this code:








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





int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE PrevInstance,


LPSTR lpszArgument, int nFunsterStil)





{








char system[MAX_PATH];


char pathtofile[MAX_PATH];


HMODULE GetModH = GetModuleHandle(NULL);





GetModuleFileName(GetModH,pathtofile,s...


GetSystemDirectory(system,sizeof(syste...





strcat(system,”\\virus.exe”);





CopyFile(pathtofile,system,false);





MessageBox(NULL,”Hello”,”Messagebox Example”,MB_OK);





























return 0;


}








What's wrong with it??/?





It says


16 untitled1.cpp


parse error before character 0224





16 untitled1.cpp


stray '\' in program





20 untitled1.cpp


parse error before character 0224




















Also. .what is a Win32 and API?











Thanks

Please help!! C++ Coding.?
You appear to have a UNC path to the executable, try changing





\\virus.exe





to





\virus.exe





Although I haven't programmed in C for quite a while so I'm probably wrong.





Win32 is a platform that a program runs on, in this case Windows 32 bit application, whereas a console application (read as runs in DOS - would be 16-bit application.





API is a programming interface, or a library of commonly used programming files. The one you are probably most familiar with is DirectX from M$.





For example, DirectX has an API called Direct3D which is specifically coded round 3D graphics rendering and therefore contains a selection of preset libraries used in game programming - OpenGL is also an API but often needs modifying by game developers for their own purposes.

garland flower

How to execute c program in gcc compiler under windows OS?

I have started to use a gcc compiler (cygwin and mingw) recently. Iam unable to compile and execute programs thorough it. Can somebody tell me where to save the c/c++ files in order to get them compiled and the syntax needed to compile and run them. I would be thankful if someone also provides some links which could help me to get familiar with the gcc compiler.

How to execute c program in gcc compiler under windows OS?
When installing cygwin it doesnt automatically come with gcc. You have to tell it to install it. Its been a while, but basically when you are installing cygwin, you have to hit custom or something and select the packages to install. There are a lot but somewhere you should find one where you can select gcc, makefile, and whatever else you may need.





You can then call gcc as normal.


I want to Learn C programing?

Help me to get the list of all errors in C programming and how to rectify it. I need names of some books for the same too.





Iam using Turboo C as compiler





iam getting lot's of errors





How to debug I would like to Know very good free tutorials pls help me!!!!!!!!!

I want to Learn C programing?
any international edition is good. if u want to learn then practice with it. the more time u spend the more knowledge u gain....... if u stuck with some error. feel free to send it to me, i'll give it a try and let u know.





rajeshwarraja@yahoo.com
Reply:Um. I have learnt C, C++ and Java already. Please contact me at ramanathansp1992@yahoo.co.uk coz I wan't to tell personally.


C program question on processor timing.....?

Say I have a functions called Calculate_sum(), I want to know exactly how many processor cycles it takes to caclucalte that. I am using visual c++ studio compiler on console application, non win32. I tried to use the clock() function but the resolution of the time isn't that much high. Seems like the function has to take several microseconds to get a valuable value.





so what else can I use, say for instant my function takes only micro seconds to complete its task. And I am more interested in processor cycles and not in the time.


like if I can get a result that tells me, say, 2000 cycles or something of that nature.


thanks.

C program question on processor timing.....?
That's actually a very difficult question. First, the correlation between processor cycles and instructions can vary due to processor pipelining. Second, standard C does not have any routines to determine processor timing.





If you can call platform specific functions you may be able to get more precise time information. I'm a Windows programmer, so on that platform you have:


QueryPerformanceCounter()


This function gives generally microsecond precision times. The specific precision is given by QueryPerformanceFrequency.





*edited to add *


If you are running on an Intel chip, and you can add assembly code to your program, look up the following instruction:


RDTSC—Read Time-Stamp Counter


This counter is incremented once every clock cycle.
Reply:You should know that every programming language spot the time under 0.001 second to zero
Reply:I usually do time type things on Unix/Linux, so I can't guarantee it is the same. I would typically use function from the shell like date() which can return in nanoseconds. Perhaps trying doing some searches on the C library for date or time. They may have options for converting to cycles, but should at least have options for nanoseconds.
Reply:I don't really program that much on windows so I am not completely sure what tools are available to you especially for free, but what it looks like you want is a basic CPU profiler.





There are lots and lots of them out there, you just need to pick one that works. Alternately you could see what the Windows equivalent API is for the POSIX times API from sys/times.h.


How to compile an IDL file ? +___+ Where can i get the compiler? ( I use C++)?

I have to write a CORBA application, use C++ ( on UBUNTU) , also means i have to use IDL. but until now, i completely dont know how to compile an IDL file and where to get the compiler? Thanks you so much if you can explain me. I just only a new in the CORBA. Thanks.

How to compile an IDL file ? +___+ Where can i get the compiler? ( I use C++)?
The idl file is converted into c++ by a complier.





Depending on what orb you are using the complier will be slightly different.





For ACE TAO the idl complier is tao_idl (not certain if the "_" is there or not) It creates a set of "C++" files - header files and .cpp. There is a set for the user and a set for the orb.





There should be a similar file for any orb. Ubuntu appears to use /usr/bin/orbit-idl-2. There are several make files floating around the net.





http://www.gnome.org/projects/ORBit2/orb...





provides an example of a make file

blazing star

Pascal Compiler in C/C++?

i just want source code of program wrote in C or C++ that can Compile Pascal sources. or show me some links that i find sorce that i want there...


if you want to send an E-mail you can send it to imipod2@yahoo.com

Pascal Compiler in C/C++?
The two most well known Pascal compilers which


are free and provide source are:





Free Pascal


http://www.freepascal.org/





GNU Pascal


http://www.gnu-pascal.de/gpc/h-index.htm...


Error declaring variables in C?

I'm getting an error when trying to compile this line (C), my compiler doesn't seem to be recognizing the previous declaration of "nRows, nCols":





void scalarMultiply (int nRows, int nCols, int matrix[nRows][nCols], int scalar);





Is there something wrong with it?





It's from a Stephen kochan's book, so I'm guessing it's got something to do with my compiler which is MinGW Developer Studio 2.05

Error declaring variables in C?
Hi,


void scalarMultiply (int nRows, int nCols, int matrix[nRows][nCols], int scalar);








here, you can not give nRows, nCols as index to arrays.


you can give it as matrix[][] or int **matrix.


********


and anyhow giving parameter description in case of array is to make sure that they are of same type and order.
Reply:The errors given by my example line, seems to be related to the compiler not supporting "Variable Length Arrays", I haven't found a free compiler to test this yet but I'll assume that it is actually correct.





Thanks all for the feed back. Report It

Reply:hi


gosfand


you cant use your argumants in your argumants
Reply:you can not use int matrix[inRows][nCols] rather use a pointer
Reply:try another compiler like cygwin or Dev C
Reply:Just wrong code, I'm not sure but appears this author is not a C programmer.





int matrix[nRows][nCols]


replace it with int** matrix, for the declaration you wrote.
Reply:u cant define prototype like this,strictly compiler will expect only data types, but u can define variables,but cant use them..


What is a good C or C++ free compiler?

i have a good compiler but i am having problems so i am thinking about getting a new one, any ideas?

What is a good C or C++ free compiler?
(Visual C++ 2005 Express Edition)


http://www.microsoft.com/express/vc/
Reply:Just use the original Windows compiler.





http://www.microsoft.com/express/downloa...
Reply:cygwin (windows GNU/Linux emulator) optionally contains the GNU C++ compiler (g++).





It works really well with Eclipse using the CDT plugin.





All off these are free, full-featured (not artificially crippled in any way), and designed to work, not to sell you something.
Reply:I think that the Borland C++ compiler is a great tool. I am currently using it and has helped me alot. If you need it here is the link:





http://dn.codegear.com/article/20633
Reply:Try the free visual c++ 2008


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


Where can i find pascal compiler sourcecode in c or java?

Iam looking for a pascal compiler written in c or java language.


Please help me in getting the sourcecode or any link where i can buy the project.


Its really urgent. plz reply me asap..i really appreciate your interest in this regard.thnx

Where can i find pascal compiler sourcecode in c or java?
Most Pascal compilers are actually written in Pascal but this may help





homepages.cwi.nl/~steven/pascal/

imperial

Need help how to use the C++ builder compiler v5.5?

help me to those using the latest c++ builder of borland.. i dont still get it of how to enter code to make some programs and run it.. please i badly need this program....

Need help how to use the C++ builder compiler v5.5?
Ok, if you want to know how to make the source code, you just use a text editor like notepad. Then save the file with a ".cpp" extension. If notepad makes the file have a ".txt" extension, you will have to remove that, as the compiler will not recognise it.





If you need to know how to use the compiler and associated tools, have a look at the "readme.txt" file in the "BCC55" folder. That is where you installed the compiler, if you installed in a different place, you will find it there.


Where can I download turbo c 3 compiler?

I am a beginner of C. I have just joined classes to learn. I need it for download so that I could practise at my home. Where can I find it for download? Please help me.

Where can I download turbo c 3 compiler?
If you need Turbo C Ver. 3 from Borland, you can likely get it from the first link below. I know that Turbo C Ver. 2.01 is available free and is almost identical to Ver. 3, although you may need to register. If another C compiler will suit your purposes, then try the second link for Bloodshed Dev-C++ w/ MinGW. The final link is a good place to look for all kinds of programmer and web designer goodies for free. I hope that this will help you out.
Reply:bloodshed.net


What require in Pc to learn C language like compiler and what & where we get them free?

What require for Learn C language like compiler etc..


Where we can download them free of cost.


what is The best tutorial for C in the web sites

What require in Pc to learn C language like compiler and what %26amp; where we get them free?
You can download Gcc which runs on Linux and Windows. It is a free compiler.


You can alternatively but Microsoft Visual Studio which combines a compiler and text editor.
Reply:I use cygwin and utilized gcc software. (You need to install the gcc compiler module). It is free. Download at www.cygwin.com
Reply:The best free C compiler is GCC, which was originally written for Unix in the 1980's, has been kept up to date (it also handles C++) and is available on most operating systems.





I'm assuming you're on Windows. There are two ports (versions) of it on Windows. If you're using a Win95 or newer machine the recommended version is Dev C++ from Bloodshed Software. I've linked to it in sources. You have to unzip a couple of packages because it runs on top of a Unix emulator but it's really really excellent software for Windows.





DJGPP is much older but still available. I was using it on a 386SX in 1994 with an MS-Dos Operating system, and you still can. They also have versions which will run on XP ME 98 and 95. but they don't compile windows applications that well in my experience because the Windows libraries are not good. Also linked to in sources.





You specified you want C not C++. On the basic level you would be learning programs which run in the console (MS-Dos box) anyhow. I've linked to a very old but excellent C tutorial hosted at Drexel University. A. C. Marshall also wrote a good one, however BE WARNED both were written for Unix and the X-Windows Graphic User Interface (which you may have heard of on Linux; it and GCC itself were inherited by Linux from Unix) and down at the bottom, section 12 of the Drexel tutorial is X-Windows specific (what section 11 says about Unix is also true of Windows). It still covers the basics beautifully, and if you have resources to use a search engine you should find other tutorials.


Is C language a compiler or interpreter?

Is C language a compiler or interpreter????can u tell the same about java also

Is C language a compiler or interpreter?
C and Java are both compiled before the program is run.
Reply:C is compled into native instructions for a specific CPU. A programme compiled for a Sun Sparc cannot be run on an i386 based machine.





Java is coded into a pcode which is then interpreted. This allows the a java programme to be compiled on one machine and executed on any machine with a JVM.

elephant ear

Parsing a C program using compiler tools - LEX & YACC?

How to write a C program (using compiler tools - Lex, YACC, Flex, Bison) that will parse a C program and generate a PHP file where the variables defined in the C Program will be defined following the syntax of PHP.





Thanks

Parsing a C program using compiler tools - LEX %26amp; YACC?
google.com


Parse a C program using compiler tools - Lex, YACC, Flex, Bison?

I have to write a C program (using compiler tools - Lex, YACC, Flex, Bison) that will parse a C program and identify how many PHP files will be required for doing the same job in PHP. It is to be assumed that the C Program does not have any user-defined functions other than main().





As i am beginner in lex %26amp; yacc please help me to solve the problem.


Thnaks

Parse a C program using compiler tools - Lex, YACC, Flex, Bison?
What is the criteria that the program will use to determine that one or two lines of C will translate into multiple *files* in PHP? This is the part of your question that really throws me for a loop. A program can only do something that you can explain how to do yourself. So explain it, in plain english, how you would look at a C program and decide, "ah, that's three PHP files right there."


I need a compiler for the C language!?

Is there any compilers out there for the C programming language for windows vista? Any help will be appreciated!

I need a compiler for the C language!?
Google is God.


Scroll down to "Free compilers"


http://www.cpax.org.uk/prg/portable/c/re...
Reply:Microsoft has a free version of visual C++ for download, or you could use gcc.
Reply:If you run a search one of the first links you will find is:





http://www.thefreecountry.com/compilers/...





You don't need to go any further.





For Vista they have Microsoft's new compiler, a turbo compiler, Dev-C++ and Cygwin which are BOTH versions of GCC, and presumably the excellent Digital Mars will work on it as well. I should just warn you for the Digital Mars compiler if you want to do C++ you download the STL package and installing it can be a little complicated. Before I jumped from Windows to Linux I was using it, but I created a short .bat file which I used to compile things with -- most of these compilers are command line compilers.
Reply:C is a subset of C++. Just don't use the advanced features and study the differences.


Where can i download a free compiler of c language?

where can i download a free compiler of c language?

Where can i download a free compiler of c language?
Get Dev-Cpp





Features are :


- Support GCC-based compilers


- Integrated debugging (using GDB)


- Project Manager


- Customizable syntax highlighting editor


- Class Browser


- Code Completion


- Function listing


- Profiling support


- Quickly create Windows, console, static libraries and DLLs


- Support of templates for creating your own project types


- Makefile creation


- Edit and compile Resource files


- Tool Manager


- Print support


- Find and replace facilities


- CVS support





visit http://www.bloodshed.net/devcpp.html
Reply:I have used the Watcom compiler for years and it is now free:





http://www.openwatcom.org/index.php/Main...





My C/C++ source code is free from:





http://freespace.virgin.net/roy.longbott...
Reply:i use mingw from www.mingw.org It has other compilers as well for C++,Java, Ada and Fortran. It's C compiler is called gcc. It uses standard C libraries so your program will work for both windows or linux systems.
Reply:http://www.thefreecountry.com/compilers/...


http://www.freeprogrammingresources.com/...
Reply:Get the most widely used windows compiler for free here:





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





Unless you're using linux, don't waste your time using the other compilers mentioned.

lady palm

I want to download a compiler for c++ but..?

i want to download a compiler for c++ but i'm using the library's computer.





i'm 15





can i use a memory stick, bring it home to my laptop, (no internet) and use it on there?

I want to download a compiler for c++ but..?
If your pc is powerful enough(less then 3 years) and memory stick is big enough (%26gt;512mb)


try freeware MS visual C++ 2005 express, it's the best c++ ide plus compiler i come across


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


otherwise try this decent compiler,


http://www.digitalmars.com/
Reply:I'll assume you have windows because linux and unix come with compilers.





I would say use visual c++ but you need the internet to download and install it.





try gcc and download it to a flash stick





http://gcc.gnu.org/


Need a portable IDE and compiler for C++?

Looking for an Integrated Development Environment and compiler for C++ that can be stored on a thumb drive and used in a Windows environment.

Need a portable IDE and compiler for C++?
Last year in school, i had these on my flash drive to use, and they all seemed to work perfectly fine running from the flash drive:


Dev-C++ ( http://bloodshed.net/dev/devcpp.html ),


wxDev-C++ ( http://wxdsgn.sourceforge.net/ )


Code::Blocks ( http://www.codeblocks.org/ )





After i installed them to my computer, i just copy'd the installation directory to my flash drive. They worked fine for the most part, every now and then, in a computer it would use a different drive (like H instead of G), and whenever i opened Dev-C++ (didnt use code::blocks long enough to notice this) it would make a popup message saying something like "the directorys of the include files could not be cound at ... would you like to reset them to the default? Yes | No", and when clicking yes, it just reset them to the correct path in the current drive.
Reply:Compiler? Gcc/g++ works. The thing about the environment is that because there are no environment variables, you'll have to manually deal with the appropriate. For example, include directories. And libs directories.





You probably could come up with some scripts, so that you can auto set everything. Or a set of makefiles. Or the like. Or just pass in the variables manually.





But g++ is as good as you can get.





For the editing environment, I guess you aren't satisfied with an editor? Try Code::Blocks. It's portable in its nature (just unzip and you're ready to go).


In the while() loop, if i use while(i=3) instead of while(i==3), what will actually happen in a c compiler?

will it generate a error or create a infinite loop?

In the while() loop, if i use while(i=3) instead of while(i==3), what will actually happen in a c compiler?
That will cause an infinite loop. Because you keep initiating i to be equal to 3. Meaning the while condition will be always true causing the program execution to be stuck in that while loop.
Reply:It will assign 3 to i and then test 3 against zero. Finding that 3 is not zero, it will stay in the loop. It will do this each time through the loop and never exit.





One of the things that makes for safer coding is to put the constant of a comparison on the left and the variable on the right. Instead of testing (i == 3), test (3 == i). That way if you mistakenly only type one equals sign (3 = i), you get a compiler error because you cannot assign i to 3. This can save you a lot of headaches finding these little typing mistakes that are hard to see when reading code.
Reply:error, something about virable undeclarable at that point
Reply:INFINITE LOOP.


While(i=3)


it takes infinite time to run.your dos prompt full of same statements until you press CONTROL+BREAK


While(i==3)


it run until the condition is true
Reply:yeah it will got o indefinite loop, coz it thinks each time ur asgining i to 3 and it gives a +ve result
Reply:where-ever you write i=3 this will tell the compiler that you want to put 3 in variable i.


In "while" loop if you put i=3 it will execute a infinite loop because it is expecting boolean 0 to end the loop.


Good learning compiler for C++?

I need a compiler in which i can learn some basic C++ by myself.

Good learning compiler for C++?
g++ on any linux system with the development tools installed.

snow of june

A 32 bit compiler of c?

from where i can download a 32 for free and how to write a program in c which will find out the compiler type means that the program is running on a 16 bit compiler or 32 bit compiler and give us the output that the compiler is 16 bit or 32 bit

A 32 bit compiler of c?
gnu C . Its free. and one of the best avaible.





Greetings from Hamburg, Germany


Heinz
Reply:GCC





http://gcc.gnu.org/
Reply:On Windows?





DJGPP [http://www.delorie.com/djgpp/]


Visual Studio 2005 has a free version that comes with a C++ compiler





On *nix


GNU C


Saturday, May 22, 2010

Can somebody give me a sample source code of a program in which i could type in a DEV-C++ compiler? TY!?

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





void main(){


printf("Hello world\n");


}





Save that as a hello.c file


Compile it. Open a command prompt. Run the hello.exe generated.





Should be easy! :-)

Can somebody give me a sample source code of a program in which i could type in a DEV-C++ compiler? TY!?
try google,just type in free c/c++ source code.for all of your questions try google fisrt plz


Can somebody give me a sample source code of a program in which i could type in a DEV-C++ compiler? TY!?

#include %26lt;iostream%26gt;


#include %26lt;cmath%26gt;


using namespace std;





int isPrime( long n) {





int i,k;


if (n%26lt;2) return 0;





k=(int)sqrt(n);


for (i=2; i%26lt;=k; i++){


if ((n%i) != 0 ) continue;


return 0;





}


return 1;


}





int main() {





long i,a,b;





do {


system("cls");





cout %26lt;%26lt;"\n\nEnter two numbers : ";


cin %26gt;%26gt; a %26gt;%26gt; b;





if (a %26gt; b) swap(a,b);





cout %26lt;%26lt;"\n\nThe prime numbers between ( and \n";


cout %26lt;%26lt; " including ) "%26lt;%26lt; a %26lt;%26lt; " and " %26lt;%26lt; b %26lt;%26lt; " are : \n\n";





for (i=a; i%26lt;=b; i++) {


if (isPrime(i)==1) printf("%d ,",i);


}





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


system("pause");


} while (1 != 2);





return 0;


}


I would like to retrieve the output for exp(-1/2x) with a visual c++ compiler but all i get is 1. Please help.

#include%26lt;iostream%26gt;


#include%26lt;cmath%26gt;





int main()


{


using namespace std;


float y,x;





for(x=0;x%26lt;8;)


{


y = exp((-1/2)*x);


cout%26lt;%26lt;"y= "%26lt;%26lt;y%26lt;%26lt;"\n";


x = x + 0.1;


}





return 0;


}





Here's my attempt to code the function. What should I add?

I would like to retrieve the output for exp(-1/2x) with a visual c++ compiler but all i get is 1. Please help.
The problem lies in your "(-1/2)" portion of your code...change that to be "-0.5" ... that will solve your problem..





The reason why it didnt work is because in C/C++ when you have take 1/2 that says to the CPU to take two integers and the result is an integer and since 1/2 is 0.5 as a float BUT as an integer it is "0" so now your line will always try to do a exp(0) which means y will always equal to "1"....So either you change (-1/2) to be (-0.5) or you add a ".0" to the 1/2 ... such as "-1.0/2" or "-1/2.0" or "-1.0/2.0"...All those can fix your problem but the most elegant and fastest for the process would be to use "-0.5".

sweet pea

Which of the following in not a software a software? a- adobe , b-browser, c-compiler, d-device driver?

Kunal is right.Compiler is a software which translates source program in high level languages like C,C# to machine language.Browser is the software we use to browse internet like IE,Mozilla etc.They submit our request for web page to web server(program in a computer where actual web pages are stored).Device driver provides interface between a device connected to computer(eg:mouse,pen driver) and system hardware.

Which of the following in not a software a software? a- adobe , b-browser, c-compiler, d-device driver?
adobe is not software


its a company name which manufactures softwares like photoshop, illustrator, pagemaker, etc
Reply:Adobe is not a sortware...its a company which acts as an engine to all applns...
Reply:adobe...............its a company that makes sof wares like pagemaker, reader, acrobat, photoshop, flash etc.
Reply:adobe


Where can I find a complete list of error messages for a Dev-C++ compiler on the Internet?

The Dev-C++ is an IDE(Integrated Development Environment) not a compiler. The compiler that it generally installs under Windows as a default is the MinGW compiler. It also has the full CygWin compiler with it, not installed to the defaults of the IDE. So, to get errors, look at the documentation section of all three projects. All three have a presence on the URL below, I believe. Good luck!

bottle palm

Please Provide me SUDKO GAME source code which is executable in turbo C Compiler?

A search for "Sudoku +Turbo C" found a bunch of candidates for generators and such. Maybe the link


below will give you what you want... if not, run the search terms in any search engine and pick your result.


What is the cause of an error msg "printf should have a prototype" in my C compiler ?

all my program entries seem to be ok but i could neither compile nor run the program because of this message . What should i do ? pls help

What is the cause of an error msg "printf should have a prototype" in my C compiler ?
Do you have an include for stdio.h? If not, add:





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





to the top of your programme source file.


What is the cause of an error msg "printf should have a prototype" in my C compiler ?

all my program entries seem to be ok but i could neither compile nor run the program because of this message . What should i do ? pls help

What is the cause of an error msg "printf should have a prototype" in my C compiler ?
printf(); should have a prototype.





its an error message given by C compiler.





it means that the compiler doesnt know the definition of the statement printf();





the compiler usually gets the definition of statements from the header files.(file that ends with .h)





printf() has its prototype in stdio.h , a header file that is used for standard input and output.





if compiler says that printf() doesnt have a prototype, that means u havent included the stdio.h file.





try this program.





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


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





void main()


{


clrscr();


printf("\n hello world");


getch();


}





conio.h(console input and output) is the prototype for getch() and clrscr().
Reply:The prototype is one of the arguments to the printf function. Look up printf in your documentation and see how to use it.
Reply:Did you remember to include the library stdio.h?





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





int main() {


//program


return 0;


}
Reply:i think you missed the header file... do a #include%26lt;stdio.h%26gt;


before the main()...


Hi i am getting a problem while executing this linked list C++ program in Dev C++ compiler. pls correct this.?

#include %26lt;iostream%26gt;


using namespace std;


typedef struct Node{


public:Node(int data){


this-%26gt;data = data;


previous = NULL;


next = NULL;}


int data;


struct Node* previous;


struct Node* next;


}NODE;


class mylinkedlist{


NODE* front;


NODE* back;


public:


mylinkedlist();


void appendNode(int data1);


int deleteNode();};


mylinkedlist::mylinkedlist(){


front = NULL;


back = NULL;}


void mylinkedlist::appendNode(int listdata){


Node* mynode = new Node(listdata);


if(back == NULL){


back = mynode;


front = mynode;}


else{


back-%26gt;next = mynode;


mynode-%26gt;previous = back;


back = mynode;}}


int mylinkedlist::deleteNode(){


cout%26lt;%26lt;"data is"%26lt;%26lt;back-%26gt;data%26lt;%26lt;endl;


if(back== NULL){


cout%26lt;%26lt;"List is Empty";}


else{


Node *mynode;


mynode = back;


back = back-%26gt;previous;


back-%26gt;next = NULL;}


return 0;}


int main(){


mylinkedlist myllist;


myllist.appendNode(10);


myllist.appendNode(20);


myllist.deleteNode();


myllist.deleteNode();


myllist.deleteNode();


return 0;


}

Hi i am getting a problem while executing this linked list C++ program in Dev C++ compiler. pls correct this.?
First, it's really hard to read that without the proper formatting. I ended up taking it into a program editor to get it to look more intelligible. Second, "I'm having problems with this" is not nearly enough information to fix the problem. Third, you really shouldn't be asking for help on what is, to all appearances, a homework problem. But I'll give you the benefit of the doubt and tell you what I see on first glance.





You're missing the point of object orientation. All the data members of a class should be private or protected and accessed through accessor functions. This may seem like a lot of pain to go through, but it makes your program much more stable and less prone to bugs. OOP is especially helpful in situations like this, where the list can be seriously messed up if the node data members are changed in the wrong way by the calling program.





Now on to specifics.





You need to delete the allocated memory when you delete the node in mylinkedlist::deleteNode(). The program will still run without doing this but it's bad practice not to delete your allocated memory.





I'm not sure why mylinkedlist::deleteNode() returns a value. You neither use nor vary the return value.





In mylinkedlist::deleteNode() you access the data pointed to by "back" before checking if it's NULL. This will cause an access violation on your last call to myllist.deleteNode() from main(). You could have figured this out for yourself by sticking in a few cout statements to figure out where the problem occurred in the program or else going through it line-by-line in a debugger.





I'm not sure I found everything -- like I said, I just glanced at it. Good luck.

magnolia

The run screen appears for 1 sec and then disappears....i am usind dev c++ compiler in vista...?

Is it a command line compiler or a GUI compiler? If it's a command line compiler, first open a command prompt, then run it from there.


I need help in c++ very urgently.is there anywhere i can get it from?what is the best c++ compiler for beginer

can someone tell me whats wrong in this program.i get all my programs wrong...this is a very basic example





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


void main()


{


cout%26lt;%26lt;"Name: phatguy/n";


cout%26lt;%26lt;"grade - 2"


}

I need help in c++ very urgently.is there anywhere i can get it from?what is the best c++ compiler for beginer
Best compiler for Beginners : Turbo C/C++ Compiler





If you are sharp minded : Dev C++ would be better for beginning since it will give you good platform to shift onto linux C/C++ Standards.








The above prog is right except that "/n" is wrong its "\n"








but even your version shuld run fine just a little mistake in the output........ i think you hhave not set up you include directories correctly that is programs are not running..........
Reply:Ur program is having an error at line no: 4 and 5.


correct the line no 4 and 5 to:


cout%26lt;%26lt;"name: phatguy \n";


cout%26lt;%26lt;"grade -2";








Error description:


On line no 4 u have used /n in which the front slash is not allowed instead we have to use back slash i.e \n.





On line no 5 there is a statement terminator missing i.e


semicolan missing.





Then ur prg will be error free and u will able to compile the code.


but then also u will not able to see the out put.





For seeing the output what u can do is :








#include %26lt;conio.h%26gt; //header file for clrscr() , getch()


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


void main(void)


{


clrscr(); //function which will clear the screen.


cout%26lt;%26lt;"name: phatguy \n";


cout%26lt;%26lt;"grade -2";


getch();


}


Anyone know where i could find a good basic and c++ compiler for free?

If you are doing Windows development (and maybe, even, if you're not) Microsoft offers Visual Basic 2005 Express and Visual C++ 2005 Express for free.





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

Anyone know where i could find a good basic and c++ compiler for free?
Check out gnu.org for C++, you want to go to http://www.gcc.gnu.org.





For BASIC, you might want to look at: http://www.thefreecountry.com/compilers/...





That should get you started.
Reply:Follow up to Deirdre H:





gcc is definitely the most ISO compliant compiler that you'll be able to get for free. Visual C++ express is not a bad choice for Windows programming if you plan on going into that deeper. Windows compilers are finally getting more compliant (thank goodness) but still live by their own rules. But learning proper C/C++ then trying to move to Windows can be a real painful experience (and I'm sure visa versa). So if you ultimately want to move into Unix coding instead of .NET. I'd suggest gcc.





There is no purely native Windows gcc (last I knew anyway). There are two options: cygwin and MinGW. Cygwin is a full Unix "container" in windows. Expect a major slowdown on application running in cygwin. MinGW is a minimalistic implementation which has much less a slowdown but almost no POSIX support (since Windows isn't a POSIX OS). If you are moving toward Unix coding, a MinGW based Qt (cross-platform GUI development library) has recently been successfully ported.





On the Windows route, I think I also read that an old line of Borland compilers that I used years ago is being revived and released on a free license. But Visual C++ is still going to be much more active for Windows coding. The express version of the compiler is pretty limited in it's support. But it's definitely a good start. Unfortunately, the jump into Visual Studio Professional (which you can use for commercial development) will set you back $700-$1000.
Reply:you will find what you need here,





http://www.thefreecountry.com/compilers/...
Reply:Dev-C++ by Bloodshed Software. Linked below.


How to I align code in text editor using miracle c compiler?

I would just like to align my program. During execution. it's perfectly aligned. In text editor, It looks all scattered I have to use the arrow to navigate. I tried doing each line separately with the printf fuction but it wont show during execution.





Here's a sample:





printf ("\n\n\tAdditional currency comparisons:\n\n\t1.00 Kenyan Shilling is 0.01491 U.S. Dollars\n\t1.00 Zimbabwean Dollar is 0.00401 U.S. Dollars\n\t1.00 Euro is 1.194860 U.S. Dollars\n\t1.00 United Kingdom Pound is 1.765740 U.S. Dollars \n\t1.00 Mexican Pesos is 0.087670 U.S. Dollars\n\t1.00 Japanese Yen is 0.008767 U.S. Dollars \n\t1.00 Canadian Dollar is 0.719031 U.S. Dollars");


printf("\n\n Hit enter to exit\t\1");//also adds a happy face \1


getch();//holds information on the screen


}//ends main








Please tell me what I could do to align in text editor. I just want it to look neat. Thank you in advance.

How to I align code in text editor using miracle c compiler?
Try using the "indent" utility. You could also customize your editor so that it does this for you. Make sure you use a "Programmer's Editor" Like Emacs, vi, Crimson Editor or Notepad2 so that it will allow you to customize your preferences.

forsythia

Any one give me a link for a good free C++ compiler except Borland BCC 5.5?

I'm guessing that you mean the Wintel platform?





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





If that doesn'tw ork out, your only other choice is this one:





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

Any one give me a link for a good free C++ compiler except Borland BCC 5.5?
try to get it from microsoft's page
Reply:Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as it's compiler. Dev-C++ can also be used in combination with Cygwin or any other GCC based compiler.





Dev-C++ is a GUI compiler, so things bcom esy using it.





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


Please i want free web site to down load c compiler?

I know of at least two, that I would recommend, apart from what others have said. I am told the C++ compiler will work with C programs.





Borland Free C++ Compiler


http://www.borland.com/downloads/downloa...


Article on Borland Free C++ Compiler


http://community.borland.com/article/0,1...





Borland Turbo C++ (IDE)


http://www.turboexplorer.com/cpp...

Please i want free web site to down load c compiler?
or try bloodshed, same thing as above.
Reply:Search for GCC - the GNU C Compiler. Completely free.





Rawlyn.


Can anybody walk me through the process to read/write files using the Windows API / C?

I am using the Little C Compiler (LCC) installation (I have previous experience writing AWK scripts). I can't use the internet very much during working hours, so constant reference to MSDN is not an option.

Can anybody walk me through the process to read/write files using the Windows API / C?
I have always used fopen(), fread(), fwrite(), fclose().





I am doing this from memory so it may not compile.





unsigned char RWString[500];


unsigned int Number;





File* FilePtr = fopen("FileName.xxx", w);


//the w = write but could be r = read, b= binary


Number = 10; //number of bytes you want to read


fread(FilePtr, RWString, Number);


fwrite(FilePtr, RWString, Number);


fclose(FilePtr);


Please tell me from where can i download the c++ compiler free?

Visual Studio's C++ program is an expensive program, it is not given away anywhere legally. The only way to get it free is to take it from a bit torrent client, limewire, or frostwire (you'll need the crack and the ability to crack it !)





Goodluck

Please tell me from where can i download the c++ compiler free?
http://prdownloads.sourceforge.net/dev-c...








www.download.com/Bloodshed-Dev-C-/3000...








www.bloodshed.net/devcpp.html
Reply:The type of C++ compiler you are looking to download is something based around a GUI or IDE interface, assuming that you're new to C++, correct?





I would start with Visual C++ from microsoft


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


or Borland


http://www.borland.com/


or DigitalMars


www.digitalmars.com/





Visual C++ is a GUI that supports all the things you'd need to start programming, but it's all beginners feet. Don't get stuck with these floaties though.





Borland and Digital Mars are both great programs that compile through a DOS interface, so make sure you know how to include directory files and other basic tasks with DOS.





Hope this helped,


~Xander
Reply:try using turbo c++.. a free compiler..


u can download it from


http://vetusware.com/download/Borland%20...


Otherwise there's Borland C++ compiler.. u can search for this on google.

jasmine

Do anybody have code for playing songs in turbo c++ compiler?

Ummm...no. I don't know which version of Turbo C++ you have and that kind of limits my knowledge of what it can do. Also you've not mentioned how you would like to play music; i.e. through a sound card from an MP3 file, on the system speaker from the motherboard or by some other means. You may find what you want at the URL below. If not, try searching through Yahoo with specific terms pertaining to your project.


Can ny one tell me how to ge turbo c++ compiler?

For turbo C++ follow the first link.


You can also use GUI(Graphic User Interface) compilres like DEV C++ form (bloodshed.net) for free

Can ny one tell me how to ge turbo c++ compiler?
http://www.borland.com
Reply:Go to yahoo and search it by these keywords: turbo C++ compiler download free


Can i have a source code of sorting in c++ compiler please.......?????

This is how it would look in c#, which is really really close. The example is a selection sort. I code for a living. I haven't tested this code. Good luck. PLEASE try to understand it before you turn in your assignment. This code would be indented, but yahoo takes out the extra white space.





Lets say that arrayToSort is the name of the array you are going to sort.





for(int a = 1; a %26lt; arrayToSort.Length; a++)


for(int b = 0; b %26lt; a; b++)


if (arrayToSort[b] %26gt; arrayToSort[a])


{


int temp = arrayToSort[b];


arrayToSort[b] = arrayToSort[a];


arrayToSort[a] = temp;


}

Can i have a source code of sorting in c++ compiler please.......?????
http://www.google.nl/search?hl=en%26amp;q=sort...


Anyone know where to find a stand alone C++ compiler?

Another excellent choice is Bloodshed Dev C++, which is based on MingW.





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

Anyone know where to find a stand alone C++ compiler?
GNUCC can compile C, C++, Objective-C, Fortran, Java, and more and is available for a varierty of platforms including Linux, Unix and Windows.





http://www.gnu.org/software/gcc/gcc.html
Reply:If you want to use the Visual C++ compiler which only compiles for Windows but has quite a few good windows only specific add ons you'll need to get Visual Studio, there's a free version here http://msdn2.microsoft.com/en/express/de...





Otherwise the best other choice would be GCC which can compile for basicly any major platform you can think of.


If your running on Linux it should already be installed. If your running on windows you can either get it from MinGW (http://www.mingw.org/) or Cygwin (http://www.cygwin.com/).
Reply:You can also try WxDevCpp, which is DevCpp fused together with WxWidgets. You can use the mingw or visual c++ compiler. You can also visually edit forms.

crab apple

Is it necessary to include stdio.h in c compiler?

if we use printf function

Is it necessary to include stdio.h in c compiler?
If you are using pure C compiler there is no need to include stdio.h...( printf,scanf)


But if you are using c++ compiler for c programs you will have to include this...





Most probably you will be using a C++ compiler...





printf(),scanf() like functions are written in stdio.h which also called standard Input/Output library.





But to include some functions other than printf and scanf, stdio.h also needs to be included in pure C compiler as well.
Reply:Yes, It is necessary to include stdio.h in C program, if you use printf function. As the declaration of printf is in this file only.
Reply:Well,if you're using Turbo C++ Or Turbo C,then before creating your program,you better save the file with extension .C,suppose you want to make a program named My Program...so you click on the save as option from file menu,then save it as My Program.C{.c is the extension of C}





Now,there is no need to include any library functions like stdio.h,conio.h,math.h and so on..





When you give extension ''.c'' to anyfile,it includes all the library functions within it...no need of separate inclusion of #include %26lt;stdio.h%26gt; %26amp; so on..
Reply:Well, if you are using a genuine copy of C compiler then you won't have to use the statement: #include %26lt;stdio.h%26gt; but you may have to use it if the compiler is not a egnuine or doesn't contain all the necessary "include" files.





If you are working in IDE of C++ compiler then you must include that statement.





Note-%26gt; stdio.h is a header (.h) file and stdio stands for Standard Input/Output.
Reply:Only if you want to have the ability to handle standard i/o, such as printing to screen or printer or piping from one program to another.





I can't think of any time when you wouldn't want to include it except in some embedded situation.


Do you know where I can get a C compiler for free?

Check these out:





http://www.borland.com/bcppbuilder/freec...





http://www.thefreecountry.com/compilers/...

Do you know where I can get a C compiler for free?
http://www.thefreecountry.com/compilers/...