Entries from 2016-09-17 to 1 day

Pset5 - Mispellings - questions.txt

やっと...!Pset5おわったよーう(T^T)!例によって、コードを書き始めてからちまちまと1週間かけちゃった。スタッフの速度に若干及ばなかったけれど...q9にあるように修正してみたものの速度が変わらなかったし、誤差の範囲内だろうし、だいたい綺麗なコード…

const char*

const char* の意味 C言語編 - char *とconst char *は違う to make sure you don’t alter the array of characters (not the pointer for it, it is changable) stored in const char*. 「const char *」というデータ型は、書き換えできない(読み取り専用の…

Pset5 - tips

In speller.c, we’ve put together a program that’s designed to spell-check a file after loading a dictionary of words from disk into memory. strcpy C言語講座:文字列版の大文字小文字変換 6.メモリ領域の動的確保 "free関数を使い忘れてもプロ…

scanf

scanf使い方 C言語 scanf 使い方 | C言語関数一覧~bituse~scanfのバッファーオーバーフローネタ http://d.hatena.ne.jp/eel3/20090720/1248017333 対策として%の後ろに最大フィールド長と呼ばれる数字をつけて「%10s」と指定すると、 10文字だけ読み込む…

Pset5- Why use fgetc instead of fscanf?

questions.txtの5問目。cs50.stackexchange.com “words in that file will not always end with a space or line return. Many will be followed by a period or comma, for example, which fscanf will see as being part of the word.”“fgetc() reads char…