H
Hendrik Wendler
Hi everybody,
this may be a stupid question:
i want to strip comments from a .cpp
file.
cpp comments look like:
// (two slashes) .... comment until newline -->|
but how do i catch newlines in different os
( UNIX / Mac / Win -> CR, LF, CR+LF)? are they always defined as '\n',
and the compilers will take care of it? or do i have to check
the file type in advance? how can i assure i strip the comments
of a MacOS file correctly under Win32?
best regards + many thanks,
hendrik
this may be a stupid question:
i want to strip comments from a .cpp
file.
cpp comments look like:
// (two slashes) .... comment until newline -->|
but how do i catch newlines in different os
( UNIX / Mac / Win -> CR, LF, CR+LF)? are they always defined as '\n',
and the compilers will take care of it? or do i have to check
the file type in advance? how can i assure i strip the comments
of a MacOS file correctly under Win32?
best regards + many thanks,
hendrik