Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
整数に遭遇するまでCで文字列を読み取るにはどうすればよいですか? 例: 1000 ボール ペン 12 15 24 「ボール ペン」を整数から分離する必要があります。それはどのように行われますか?
私が行う方法は、おそらくfgets行全体を取得するために使用し、次のようにして手動で解析することです。
fgets
strtoul
isdigit