2016-09-19 04:14:09

Hi folks I've started c programming and as visual studio suggested me I've download code blocks.
but when I compile the file it says nothing.
when I tried to run the file it says "information" this file is not built yet. do you want to built it now? I clicked on yes and again the same dialogue box exist.
I cannot see the output of my file.
anyway here is the code
#include<stdio.h>
main()
{
printf("hello I am ishan");
}
Thanks
Ishan

life's battle do not always go to the stronger and faster man,
But sooner or later who win the one who thinks he can!

2016-09-19 07:17:48

What version of code blocks did you install? I didn't run into any issues testing the code, but I installed the "codeblocks-16.01mingw-setup.exe" version which comes pre-packed with the mingw compiler component.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2016-09-19 13:34:00

hello,
first, instead of writing main(), you must write int main()
or if you need command-line, you must write int main(int argc, char** argv)
then, you need a project file, create one from file->new->project
and then add your files there, then compile your project

2016-09-19 17:20:14

Hi visual studio!
which File should I include?
and what is the difference between main() and int main()
Thanks
Ishan

life's battle do not always go to the stronger and faster man,
But sooner or later who win the one who thinks he can!

2016-09-19 19:41:48

main is a function and eatch function must have a return type
then, you need to create a project and add your C sources there using project->add files or if you want to add everything in a folder, project->add files recursively

2016-09-20 04:53:03

so in short you are saying
that lastly I've to write
return 0 or something like that.
Thanks
Ishan

life's battle do not always go to the stronger and faster man,
But sooner or later who win the one who thinks he can!