User forums > Using Code::Blocks
How to buid and run a program
(1/1)
Faradaysfinest:
Good evening/ morning to the gentlemen and ladies in the forum. I am quite new to this and I hope my post adheres to the group rules.
I am relatively a newbie to using code::blocks to write programs and execute them. I did C programming in university (graduated in 2008) but to a very basic level. I have recently decided to pick up programming , now in C++ cause I intend to grow my skill and build applications. To this end I will be writing a program or two a day for the next 90 days to see how far I will go from there.
My first program of today is as follows:
#include <iostream.h>
#include <conio.h>
int main()
{
clrscr();
int value1, value2, sum;
cout<<"Enter first value:";
cin>>value1;
cout<<"Enter the second value:"
cin>>value2;
sum = value1 + value2;
cout <<"\n";
cout << "The sum of the given values is: ";
cout << sum;
return 0;
}
just a simple program to add two numbers so really it shouldnt be a problem. However, something is amiss with my code::blocks because I am not being able to compile or run it and I suspect that I need some help setting up the code::blocks compiler. I am getting the following error message
Build file: " no target" in "no poject" (compiler: unknown)
fatal error: iostream.h: No such file or directory
Build failed: 1 error(s), ) warnings(s)
May someone advise me how to configure the compiler and also how to import a singular file into a project. Thank you
Regards,
Faradaysfinest
Pecan:
Get City College of NY:
http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/codeblocks-instructions.pdf
Read the section on First project.
Or
https://www.codeblocks.org/user-manual/
stahta01:
https://wiki.codeblocks.org/index.php/User_documentation
Where did you install the Compiler?
What operating system?
What error did you get? Post the build log information.
Tim S.
Navigation
[0] Message Index
Go to full version