Pregunta

enter image description here

I'm building a project in C++ and I'm having some standard library issues.

When I use uint_t family types, the compiler shows an error message.

For example, when I declare a uint_8 type variable, it show an error in vim

uint8_t in namespace std does not name a type

does anyone know the problem?? (of course I included cstdint)

I tried stdint.h of C library and it works. (though I actually want to use the standard C++ lib)

Ddditionally, the problem is that I have same problems with other c++ standard classes such as array`

And I use g++ version 4.8.2

¿Fue útil?

Solución

The support of <cstdint> and <array> is added since C++11, add the flag -std=c++11 to g++, and it'll compile.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top