Saturday, May 22, 2010

Why we get "declaration syntax error in c" & what is gcc compiler?

declaration syntax error: Number of causes but is basically an error where or how you are declaring a function , variable or anything else which must be declared. Your basic spelling and form of what you typed is reconizable by the compilier the problem is where this section of code is located





The error is usally indicated just after the ocurrance of the offending code which may give you a clue.





For example C requires a main function to be declared first which will contain your program





void main ()


{


'your C program goes here


int myFunction(int)


{


code foo


}


}





This would compile as main is declared in its proper location


how ever





int myFunction(int)


{


code foo


}


Void main()


{


other code





}





This code would most likely cause a declaration syntax error to happen just after the line containing [int myFunction(int)]





GCC: Is an open source C compilier. My limited experience with it comes from evaluating a GCC compilier for an AVR 8 bit micro processor. GNU is an open source operating system (think Linux). The GCC I tried was ported over to windows.





GCC = GNU C Compilier


GNU = Gnu (as in the animal name) is Not UNIX


I'm trying to learn c++ my own. What compiler should i use?

which i can download from the internet for free

I'm trying to learn c++ my own. What compiler should i use?
You can download Bloodshed Dev C++ for free at download.com. It is a very reliable compiler as byte-wise, it is smaller than many mass and power IDEs out there. Also, you won't have to worry about it taking up all your RAM as an IDE like NetBeans would... C++ is a great language. Have fun!
Reply:Bloodshed Dev C++
Reply:Well if you are using windows, Bloodshed Dev C++ is the best...and if you are using Mac fire up Xcode (already included on any new versions of OSX).





http://www.bloodshed.net





Good luck, fellow programmer!!! :]


Also if you want a great place to learn...go on the IRC's and just start asking questions on the c++ chat rooms!





info on irc's : http://en.wikipedia.org/wiki/Irc


What are the other COMPILERS that i can use other than Turbo C?

The Turbo C compiler is not Printing matrices of higher order.


I require to calculate %26amp; output around 300X300 Matrix...


Also tell me where will i get these compilers..


Also tell me how to avoid NAN's %26amp; Garbage values in the Output Matrix.


Thank You

What are the other COMPILERS that i can use other than Turbo C?
If the compiler is really the problem, Microsoft now have free versions of their compilers available to download. You can get Visual C++ from:





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





There are some limitations in the 'express editions', but I've been able to do everything I need to do with them. I can't even remember now what the limitations are :).





NaNs probably mean that somewhere in your code you're calculating invalid floating point values. You'd need fo check the code to find out where that's happening.
Reply:it is not the complier, it is the memory allocation that matters. if you were talking about big element values inside the matrix, you may use double type, or you can try the 64bit gcc to compare the differences (but you don't actually need 64bit engine to handle big values). you can also consider writing intermediate results to a tmp file ...
Reply:** Checks google.com. Hmm, looks like it is working. Not sure why Google didn't work for you.





C compilers:


Visual C++.


gcc


Various others found with Google.





%26gt;%26gt; I require to calculate %26amp; output around 300X300 Matrix...


You didn't try to initialize that on the stack did you?





%26gt;%26gt; Also tell me how to avoid NAN's %26amp; Garbage values in the Output Matrix.


Fix your code. It's a good bet you wrote your code wrong. Getting a different compiler won't help if you can't write C code properly.

online florists

Hi! You know how c# uses visual studio compiler, my question is what do i use for Python and where do i downld

so where do i dwnld it from pls and if possible i need a tutorial on python

Hi! You know how c# uses visual studio compiler, my question is what do i use for Python and where do i downld
this :)


enjoy
Reply:Look for a Python that works under .net following is a link or try iron Python. If you already know C# this will be easiest.


http://sourceforge.net/project/showfiles...





Other way is to find alternate IDE like active state is. Active state is IDE for Python /Perl and quite a bit of other free languages. The compiler is free but you have to pay for IDE.


www.ActiveState.com





Samples and documentation can be found with Iron Python


http://www.codeplex.com/IronPython


http://www.thescripts.com/tutorial.html
Reply:Python doesn't require compilation as it is an interpreted language (although there are programs to turn python code into native exe I think py2exe is the package?)





The previous link provided will be good to get the python interpreter loaded on your computer... I recommend BoaConstructor for your dev environment... and for tutorials just look at some code... if you're comfortable with c#, you should be able to pick up python relatively quickly.


Can I compile C on macbook? Which compiler should I use?

Yes you can.


http://www.intel.com/cd/software/product...


Its not free, but it has a free trial I belive.


Enjoy.

Can I compile C on macbook? Which compiler should I use?
yes,


absoft


http://www.absoft.com/evalform.html


gcc.gnu


http://gcc.gnu.org/install/specific.html


metal


http://www.iit.edu/~sarimar/GDS/metal.ht...


freepascal FPK Pascal


http://www.freepascal.org/





versiontracker ~ c compilers


http://www.versiontracker.com/php/qs.php...


..


Why does Dev C++ give me this compiler error?

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





int main()


{


printf("Here");


char something[5];


return 0;


}





Error:line 6


parse error before `char'

Why does Dev C++ give me this compiler error?
if this is a .c file, then the reason is that you have declared local variables AFTER a function call. This is legal in c++ but not in c.





swap the printf and char lines and it should work.


Is there any other option instead of cygwin for C compilers?

Ok, I'm starting to learn C. And like the idea of writing programs in notepad and then compiling them on the command prompt.





And cygwin is very good with this. The only thing is that it takes a lot of space in my hard disk and I don't need all the other tools or the Unix environment... I just need the compiler (gcc in cygwin).





Is there any other download that only downloads the compiler. Or do you recommend me some simple IDE with compiler that doesn't have a lot of stuff. I just don't want to get blurred with all the IDE's details and stuff. I just want to learn C.

Is there any other option instead of cygwin for C compilers?
What I did when I only had one computer is install VMware server and create some virtual computers/servers with Linux on it... Now, since disk space is a factor, I'd suggest you take a look at





http://www.delorie.com/djgpp/ for DOS


or


http://www.mingw.org/





IMO, you would have much more fun programming under some light linux distribution... For that, just download the VMware Server (they give free serial keys from the VMware website), get a light distro ( http://www.linuxlinks.com/Distributions/... ) and get gcc working on it. Then you'll be able to use sockets, play around with devices and anything there is on the linux virtual system, w/o being afraid to mess things up on your principal operating system; the virtual machines do not interfere with the principal OS.





If you need anymore help with this, just post what you chose to do and what problem you're coming up with!

flowers uk