I have a question regarding pointers. Let's say I pass a character array through a function parameter as a constant pointer as such:
Code:
void main(void)
{
char disk[10];
// some code until
usart_str_write(disk);
// some more code
}
void usart_str_write(const char* string)
{
while (*string != "\0")
{
Usart_Write(*string);
string++;
}
}
given function declaration
Code:
char Usart_Write(char data);
In usart_str_write, should I do anything to make the pointer *string derefence back to the initial character, although I won't be doing any more tasks with it?
Thanks.