help with code error

directorabbey 0 Tallied Votes 266 Views Share
void Halt ();
void Reply (const char * num,uint8_t stat);

{

this is the error message for this code
7|error: 'uint8_t' has not been declared
9|error: expected unqualified-id before '{' token

no idea
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

uint8_t as others of that ilk are not defined by default by c or c++. You either need to include some header that defines them for you, or you need to define them yourself as in:

typedef unsigned char uint8_t;

deceptikon 1,790 Code Sniper Team Colleague Featured Poster

As rubberman mentioned, those typedefs are specified in <stdint.h> (for C) and <cstdint> (for C++). But note that <cstdint> wasn't officially supported by C++ until the C++11 standard, so if you're not compiling against that standard then defining your own or using the Boost library would be options to consider.

directorabbey 0 Newbie Poster

thanks. i will check it and get back to you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.