0
if i download the programs for c++ on my pc ( codebuilds and the compiler ) and i want to write a program in my package ( workspace ) i create a new file and write smthing beginning #include <iostream> using namespace std; int main () { ... } and i want to run it, it always runs this first program : Hello World. and not my written program how can i run just my written program ? have i maybe to write anything else as int main () {} ?
16 ответов
+ 2
yes in main u have to write clrscr(); which means clear screen and it will show your new programme
+ 1
ty
+ 1
have i to return everything with return 0; ?
0
where have i to write it ?
0
can main stay as it is then ?
0
int main{
clrscr();
then continue your code
0
I hope you got the point
0
int main() {
clrscr();
.....
}
0
please try now this one
0
i'm outside now will try it later
0
welcome bro
0
but why did u change the main from int main to int main() ?
0
it don't work
0
maybe i told my question false :
i have 2 tabs open in codeblocks and both of it are main programs but it always runs the first of the programs
0
Maybe the hello world project was active, but the file you're seeing is not in it. you can double click a project to make it active. and the program that it will build is always the active one. so double click your project.
0
doubleclick my project or my new file ( program ) ? because the hello world prgram is in my project