Re: [anjuta-list] Hi c++ question



Hi,


On 31/10/2012 17:48, ivan ballester wrote:
i've just installed your program but when i try to build a c++
proyect like this:
#include <iostream>
using namespace std;
int main()
{
int numero=4;
     cout<<numero;
     system("pause");
     return = 0;
}

Always says this at terminal and ive done a different program,:
Hello world!
----------------------------------------------
Program exited successfully with errcode (0)
Press the Enter key to close this terminal ...

and also when i built all says that is not possible cause there is no
name specified for folder.Is anyway for me to find a tutorial of how to
make a c++ proyect with this program?, i like it very much and i want
use it often.

To make a C++ project you need to do:
- Start Anjuta
- Click on File->New->Project
- Select C++ tab and C++ Generic project icon
- Click on Continue
- The default option should be right so click on Continue again
- Same thing, click on Continue
- Click on Apply
- The new project should open in Anjuta, click on Run->Run
- The configure dialog should have valid options, click on Run
- The program will be built and run in a terminal, so you should have the message that you just send:
  Hello world!
  ----------------------------------------------
  Program exited successfully with errcode (0)
  Press the Enter key to close this terminal ...

At that point you already have made a C++ project with Anjuta.


Then, if you want to modify it. You need to open the source code and edit it. You can find it easily in the project view pane on the left. It is the file main.cc in src/foobar_cpp by default. Double click on it to open it in the editor.

Then you can replace the current code by your own code and click on Run->Run to execute it. As you have modified the source, Anjuta will try to recompile your code before executing it. You can click on Build->Compile to only compile it.

The code above contains some errors so you will get a list of errors in the message pane at the bottom and it will not run.


I don't know what is the error about the missing folder name. I need more informations. How do you get this error? on which button or menu item have you clicked, what is the exact error message?


Regards,

Sébastien


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]