Is there a way just put a few characters into a string instead of copying everything of a string into another string. Heres an example that im working on.
however, the problem is that when i look at the value of net_data, there are the two letters that i want in there, and then there is garbage followed after that, even after i did thisCode:strcpy(net_data,""); strcpy(net_data_buffer,""); while(data_char2[p]!='.') { net_data_buffer[start]=data_char2[p]; start++; p++; } net_data_buffer[start]='\n'; strncpy(net_data,net_data_buffer,start ); start=0; p++;
Code:strcpy(net_data," ");