Jim Michaels <[email protected]> writes: > printf("abc%" "I64u" "def", 12); > ^ > inttypes-strings.cpp:5:19: error: expected ')' before 'PRSIu64' > printf("abc%" PRSIu64 "def", 12); > ^ > inttypes-strings.cpp:5:36: warning: spurious trailing '%' in format > [-Wformat=] > printf("abc%" PRSIu64 "def", 12); > > > #include <inttypes.h> > #include <stdio.h> > int main(void) { > printf("abc%" "I64u" "def", 12); > printf("abc%" PRSIu64 "def", 12); > return 0; > } > > has the c++ standard been changed? it used to be that C/C++ would > join separate strings that are separated by whitespace. this was a > very useful feature and I need it. > thanks.
PRSIu64 is not a string. It is not surrounded by quotation marks. The fact that the compiler accepts the first printf but rejects the second makes obvious that there is no problem with string concatenation. Apart from that, is %P a valid conversion format? I suspect that it is another typo on your test case. ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
