[cpp] Removed readfile snippet.

The snippet doesn't use expected C++ practices for reading files and
is more of a Textmate legacy.
This commit is contained in:
Aaron Broder 2012-08-31 14:56:09 -07:00
parent a3e5bbed2b
commit 03b7d9e98b

View File

@ -95,16 +95,6 @@ snippet cout
# std::cin
snippet cin
std::cin >> ${1};${2}
# read file into vector
snippet readfile
std::vector<char> v;
if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) {
char buf[1024];
while (size_t len = fread(buf, 1, sizeof(buf), $2))
v.insert(v.end(), buf, buf + len);
fclose($2);
}${3}
##
## Iteration
# for i