The weird thing that the returned Login is not the one I sent to the function ("root")... it's some just some value, is that normal???Code:void function(struct LoginInfo *login_info)
{
strcpy(login_info->RouterAddress, "1.0.0.1");
strcpy(login_info->Password, "hello world");
}
main()
{
struct LoginInfo {
char RouterAddress[30], Login[30], Password[30];
} login_info;
strcpy(login_info.Login, "root");
function(&login_info);
}
Thank you.