Hi everyone I want to develop a web server using the cygnal 8051 mcu, but I want to know how can I declare a varible or array for the next data: Data "HTTP/1.0 200 OK" , $0d , $0a Data "Content-type: text/html" , $0d , $0a , Data "<html><head><title>Test </head>" please someone who know how to declare a global variable to put in this variable, strings, constant and how is the best way to pointer to this variable too maybe can be : unsigned data webpage [] = " ..." is it ok?? thanks for the help
Thanks For the help Drew I learn C but about arrays I don't know very much. You say the char *webpage is a array of pointers and how can I use it?? and if I want to write this strings in the code space how can I read then.. please explain more about that Thanks very much
char* webpage[]
extern void SendToBrowser (char* p); U8 i; for (i = 0; i < NumLinesInWebHeader; ++i) { SendToBrowser (webpage[i]); }
char const code stringConstant[] = "my string";
Just a note about arrays and variables. In fact , in ANSI C next lines are different: unsigned char array[] = "test"; unsigned char *array = "test"; First line allocates just 5 bytes; second line allocates 5 bytes for the string + some (2/4/?) bytes for the pointer to this string.