I got this snippet from an SO thread: char string1[100]; fgets(string1,100,stdin); string1[strcspn(string1"\n")]=0; //strip everything after ...
確定! 回上一頁