MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/w5tfr7/finally_embed/ihd7291/?context=3
r/cpp • u/pavel_v • Jul 23 '22
202 comments sorted by
View all comments
Show parent comments
6
I don't need to craft the text file in any way - your "answer" just doesn't work for any text file.
0 u/orangeoliviero Jul 23 '22 What's your point? #embed doesn't just work for any binary file either.#include inserts a text file into your program at the point of the directive. If your text file isn't well-formed, then of course your program isn't going to handle it well. 2 u/cmeerw C++ Parser Dev Jul 23 '22 Aehh... #embed works for /dev/urandom for example, so what binary files wouldn't it work for then? -1 u/orangeoliviero Jul 23 '22 Whatever binary files don't fit with what you're expecting there. You can't expect to #embed /dev/urandom and expect it to just work, can you? → More replies (0)
0
What's your point? #embed doesn't just work for any binary file either.
#embed
#include inserts a text file into your program at the point of the directive. If your text file isn't well-formed, then of course your program isn't going to handle it well.
#include
2 u/cmeerw C++ Parser Dev Jul 23 '22 Aehh... #embed works for /dev/urandom for example, so what binary files wouldn't it work for then? -1 u/orangeoliviero Jul 23 '22 Whatever binary files don't fit with what you're expecting there. You can't expect to #embed /dev/urandom and expect it to just work, can you? → More replies (0)
2
Aehh... #embed works for /dev/urandom for example, so what binary files wouldn't it work for then?
/dev/urandom
-1 u/orangeoliviero Jul 23 '22 Whatever binary files don't fit with what you're expecting there. You can't expect to #embed /dev/urandom and expect it to just work, can you? → More replies (0)
-1
Whatever binary files don't fit with what you're expecting there. You can't expect to #embed /dev/urandom and expect it to just work, can you?
→ More replies (0)
6
u/cmeerw C++ Parser Dev Jul 23 '22
I don't need to craft the text file in any way - your "answer" just doesn't work for any text file.