Hi everybody,
I wrote these few lines of code:
#include <stdio.h>
int main(int argc, char **argv)
{
int v[5];
int i,j;
for(i=0;i<5;i++){
scanf("%d", &v);
}
for(j=0;j<5;j++){
printf("%d", v[j]);
}
return 0;
}
There are no errors in compiling phase...
This is the Build Output:
Current working directory: /Users/Francesco/ProgettiCodeLite/debugger/Debug
Running program: /usr/bin/open /Applications/codelite.app/Contents/MacOS/codelite-terminal.app --args --exit --wait --working-directory "/Users/Francesco/ProgettiCodeLite/debugger/Debug/" --title "./debugger " --cmd ./debugger
Program exited with return code: 0
So codelite launches the terminal where I can type the "INT" numbers in order to fill the vector.
It is now that I face the problem: I can type every number from keyboard but the button "RETURN" of the keyboard seems not to function... so I cannot enter the second number, since the first one has no ending!
For example I can type: 3434433355 as first number, but since the "RETURN" button doesn't function I cannot enter the 2nd number of the vector
What can I do to solve that matter?
Thank you Guys, waiting for you!
Problem with scanf vector
-
- CodeLite Curious
- Posts: 3
- Joined: Fri Jun 10, 2016 5:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact: