c - How to preserve new lines when doing: #include "file" -


the file has empty new lines.

"a" "" "b" "" "c" 

file included program via following method

fputs ( #include "file" ,stdout ); 

actual result:

abc 

expected result:

a  b  c 

c merges string literals separated whitespace. when write

"a" "" "b" "" "c" 

c compiler merges them "abc"; cannot detect difference between 2 sources once code compiled.

if want line breaks, insert them string literals explicitly:

"a\n" "\n" "b\n" "\n" "c" 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -