Code::Blocks Forums

User forums => Help => Topic started by: RitualSilence on September 14, 2011, 01:32:57 am

Title: Need help! In college and extreamly new to this
Post by: RitualSilence on September 14, 2011, 01:32:57 am
Hello, I am a college student and im very new to programming.  I am a week into my class and am now confused on how to properly use Code::Blocks.  The students were able to choose their own compiler/IDE  I chose Code::Blocks because I have read good things about it.  When I emailed my professor to tell him which program I was using I was asked if it was ANSI C.

Is Code::Blocks ANSI C? 

I saw in the options to change it to std=98 but not to change it to std=99.  If Code::Blocks is not std=99 by default how would I go about changing it if at all possible? 

Please respond as if you were talking to someone who is very unfamiliar with the terms and jargon, im very new and its a bit overwelming.  Thank you in advance!
Title: Re: Need help! In college and extreamly new to this
Post by: oBFusCATed on September 14, 2011, 01:50:14 am
The best is to start reading. Probably a good place is our FAQ:

Start with these two:
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_is_Code::Blocks.3F
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_What_Code::Blocks_is_not.3F

BTW: you've misspelled/misread the option name, the real one is -std=c++98.
You are looking for -std=c99 or something similar, consult the manual of your compiler of choice.
And then add the option to "project -> build options -> compiler settings -> other settings"

Keep in mind that C::B is mostly C++ IDE, so C is not our main target. (C++ is not the same as C+objects it is absolutely different beast:) )
Title: Re: Need help! In college and extreamly new to this
Post by: RitualSilence on September 14, 2011, 01:59:19 am
Thank you
Title: Re: Need help! In college and extreamly new to this
Post by: Jenna on September 15, 2011, 12:44:43 pm
And don't forget: if a compiler option is not chosable as checkbox, you can add it manually in the projects build options in "Other options" tab, just by typing the whole parameter there.
Or you can create a compiler that always uses these special settings, by duplicating (and renaming) an existing one in "Setup -> Compiler and debugger" and permanetly (and global) fix the settings to your needs.
So you can create a strict ansi-compiler without the need to make the chjanges everytime you create a new project, or you can even use it for single-files without project, if you make your "special" compiler the default one ("Set as default" in "Setup -> Compiler and debugger").