I am new to C and am trying to read the characters in a string serially but I keep getting the error

makes pointer from integer without a cast

This is my code

void UART1PutChar(char Ch)
{
    //char data;
    //transmit only if Tx buffer is empty
    while(U1STAbits.UTXBF ==1);
    U1TXREG = Ch;
}
// Send a zero-terminated string to UART 1
void UART1SendStringSerially(char *string)
{
    while(*string)
    UART1PutChar(*string++);
}

int main(void)
{
    UART1SendStringSerially('Hello');
}

Why do I get such an error? How can this be solved? Thanks

'Hello' should be "Hello".

Thanks a lot :) Problem solved :)

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.