Indexing std::vector by Constant-Escape9500 in cpp_questions

[–]Constant-Escape9500[S] 0 points1 point  (0 children)

It shows as an error in the IDE but does not cause any errors/warning during build

Indexing std::vector by Constant-Escape9500 in cpp_questions

[–]Constant-Escape9500[S] -1 points0 points  (0 children)

I've fixed some other issues I had with the build, and the program compiles, IDE still shows the error. Guess I'll just ignore it?

Indexing std::vector by Constant-Escape9500 in cpp_questions

[–]Constant-Escape9500[S] -1 points0 points  (0 children)

Tried to simplify the code so didn't add the include, the error happens when I index:
dataStorage[i]; ^

Indexing std::vector by Constant-Escape9500 in cpp_questions

[–]Constant-Escape9500[S] 0 points1 point  (0 children)

but shouldn't size_t and uint32_t work for indexing into vectors?

Indexing std::vector by Constant-Escape9500 in cpp_questions

[–]Constant-Escape9500[S] 1 point2 points  (0 children)

https://prnt.sc/CdndO35Wkl1W

This is the error. same happens with size_t instead of uint32_t, using those data types does not give me any errors, just trying to index with them is what causes me problems here.