0
Prefix sum??
What is wrong can't run in vs code print sum wrong number . It is run on sololearn but not in vs code Like this 223444555 45667777 34556667 45677885 Why?????????? https://code.sololearn.com/cTFxJyyQOi2D/?ref=app https://code.sololearn.com/cTFxJyyQOi2D/?ref=app
2 Antworten
0
Anuj Khare ,
Try to read your warning you got from the SoloLearn compiler.
Here's what it told me:
```
./Playground/file0.cpp:
5:15: warning: comparison of integer expressions of different signedness: 'int' and
'std::vector<int>::size_type' {aka 'long unsigned int'}
[-Wsign-compare]
5 | for(int i=0;i<v.size();i++)
```
try adding long unsigned to `int i`, at line 5.
{
0
Plus, showing us what error you get from the VSCode compiler may help us a lot from answering your questions, since I don't use it.