I have a working program but now I have to use the int argc
and char *argv[]
parameters to main
. Whenever I try to do this it gives me errors that it cannot save. Is there any way to make argc
and argv
work in Eclipse?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- selenium+eclipse 打开网页时报错
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- Eclipse failing to open
- What exactly do pointers store? (C++)
I guess your problem is that you don't know hot to pass argument to you program, when you execute it through eclipse isn't it ?
If that is what you want, read the following.
Click on the "Project->Properties" then in "Run/Debug settings" click on the "New button". Choose C++ application. Here you can see that there are 4 tabs, and the second tab is called "arguments". In this tab you can see a textarea. Type your application's argument there, and click "OK". When you will execute your application thanks to the "play" button of eclipse, your program will be called with arguments.