[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:
parent
a3e5bbed2b
commit
03b7d9e98b
@ -95,16 +95,6 @@ snippet cout
|
|||||||
# std::cin
|
# std::cin
|
||||||
snippet cin
|
snippet cin
|
||||||
std::cin >> ${1};${2}
|
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
|
## Iteration
|
||||||
# for i
|
# for i
|
||||||
|
Loading…
Reference in New Issue
Block a user