avatar
p*w
1
是不是在某个时间前提交给银行,在当天就能处理吧?
然后就能拿到个收据之类的么?
avatar
n*0
2
看完就一个感觉,TMD至于嘛。
为悲剧而悲剧。那么多元素硬堆在一起非常生硬的把人往绝路上赶。
没有一点先天的倾向,能走到这一步。
28岁的人,老妈再管得严,再他妈性压抑,这那压抑的,被威胁,压力大的,至于到杀
人的地步(虽然不是真的,其实也是真干了)。人生还长着呢。那个坎儿还不是那么好
过的。
不如wrestler那么让人信服。那是山穷水尽,希望尽失,最后的壮烈了,比较自然。
反正,要说会,也可能,人群里神经质的总是有的。大学里哪个年级每那么一两个。
Portman演得挺生硬的,tightly wrapped white swan, OK, easy, just not laugh,
nerves all the way. The transition into hallucinating double character is
not so convincing and cliche.
几个配角挺出彩的。
avatar
x*a
3
I got thousands problems on the following piece of code "dumpfile.h" when I
compile under cygwin. it is ok under visual stduio... can anyone help?
Thanks!
#include
#include
#include //ostream_iterator
#include //cerr
#include //std::copy
template
void dump_to_file(const char* filename, const std::vector& v_d){
std::ofstream ofs(filename);
if(!ofs){
std::cerr<return ;
}
std::copy(v_d.begin(), v_d.end(), std::ostream_iterator(ofs, "n"));
ofs.close();
}
$ make
g++ -g -std=c++11 -pedantic -I /usr/local/include/ -Wall -o IRC.exe main.cpp
-L /usr/local/lib/ -l libboost_regex
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:40:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/codecvt.h:485:61: error
_facet(const std::locale&) [with _Facet = std::
std::codecvt]’ in namespace ‘std::std’ (which
does not e nclose
namespace ‘std’) [-fpermissive]
use_facet >(const locale&);
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/codecvt.h:489:61: error
nst std::locale&) [with _Facet = std::std::
codecvt]’ in namespace ‘std::std’ (which does not
enclose na mespace ‘
std’) [-fpermissive]
has_facet >(const locale&);
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/codecvt.h:496:64: error
_facet(const std::locale&) [with _Facet = std::
std::codecvt]’ in namespace ‘std::std’ (which
does no t enclose
namespace ‘std’) [-fpermissive]
use_facet >(const locale&);
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/codecvt.h:500:64: error
nst std::locale&) [with _Facet = std::std::
codecvt]’ in namespace ‘std::std’ (which does
not enclose namespace
‘std’) [-fpermissive]
has_facet >(const locale&);
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:41:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:99:11: error: ‘::
fpos_t’ has not been declared
using ::fpos_t;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:101:11: error: ‘::
clearerr’ has not been declared
using ::clearerr;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:102:11: error: ‘::
fclose’ has not been declared
using ::fclose;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:103:11: error: ‘::
feof’ has not been declared
using ::feof;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:104:11: error: ‘::
ferror’ has not been declared
using ::ferror;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:105:11: error: ‘::
fflush’ has not been declared
using ::fflush;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:106:11: error: ‘::
fgetc’ has not been declared
using ::fgetc;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:107:11: error: ‘::
fgetpos’ has not been declared
using ::fgetpos;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:108:11: error: ‘::
fgets’ has not been declared
using ::fgets;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:109:11: error: ‘::
fopen’ has not been declared
using ::fopen;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:110:11: error: ‘::
fprintf’ has not been declared
using ::fprintf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:111:11: error: ‘::
fputc’ has not been declared
using ::fputc;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:112:11: error: ‘::
fputs’ has not been declared
using ::fputs;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:113:11: error: ‘::
fread’ has not been declared
using ::fread;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:114:11: error: ‘::
freopen’ has not been declared
using ::freopen;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:115:11: error: ‘::
fscanf’ has not been declared
using ::fscanf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:116:11: error: ‘::
fseek’ has not been declared
using ::fseek;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:117:11: error: ‘::
fsetpos’ has not been declared
using ::fsetpos;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:118:11: error: ‘::
ftell’ has not been declared
using ::ftell;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:119:11: error: ‘::
fwrite’ has not been declared
using ::fwrite;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:120:11: error: ‘::
getc’ has not been declared
using ::getc;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:121:11: error: ‘::
getchar’ has not been declared
using ::getchar;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:124:11: error: ‘::
gets’ has not been declared
using ::gets;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:126:11: error: ‘::
perror’ has not been declared
using ::perror;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:127:11: error: ‘::
printf’ has not been declared
using ::printf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:128:11: error: ‘::
putc’ has not been declared
using ::putc;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:129:11: error: ‘::
putchar’ has not been declared
using ::putchar;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:130:11: error: ‘::
puts’ has not been declared
using ::puts;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:131:11: error: ‘::
remove’ has not been declared
using ::remove;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:132:11: error: ‘::
rename’ has not been declared
using ::rename;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:133:11: error: ‘::
rewind’ has not been declared
using ::rewind;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:134:11: error: ‘::
scanf’ has not been declared
using ::scanf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:135:11: error: ‘::
setbuf’ has not been declared
using ::setbuf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:136:11: error: ‘::
setvbuf’ has not been declared
using ::setvbuf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:137:11: error: ‘::
sprintf’ has not been declared
using ::sprintf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:138:11: error: ‘::
sscanf’ has not been declared
using ::sscanf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:139:11: error: ‘::
tmpfile’ has not been declared
using ::tmpfile;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:141:11: error: ‘::
tmpnam’ has not been declared
using ::tmpnam;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:143:11: error: ‘::
ungetc’ has not been declared
using ::ungetc;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:144:11: error: ‘::
vfprintf’ has not been declared
using ::vfprintf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:145:11: error: ‘::
vprintf’ has not been declared
using ::vprintf;
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/cstdio:146:11: error: ‘::
vsprintf’ has not been declared
using ::vsprintf;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:282:23: error: ‘
string’ in namespace ‘std::std’ does not name a type
open(const std::string& __s, ios_base::openmode __mode)
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream: In member function
‘std::std::basic_filebuf<_chart _traits="">::__filebu
f_type* std::std::basic_filebuf<_chart _traits="">>::open(const int&, std::ios_base::openmode)’:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:283:25: error:
request for member ‘c_str’ in ‘__s’, which is of non-cla
ss type ‘const int’
{ return open(__s.c_str(), __mode); }
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream: At global scope:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:486:33: error: ‘
string’ in namespace ‘std::std’ does not name a type
basic_ifstream(const std::string& __s,
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:561:23: error: ‘
string’ in namespace ‘std::std’ does not name a type
open(const std::string& __s, ios_base::openmode __mode = ios_base::in)
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:661:33: error: ‘
string’ in namespace ‘std::std’ does not name a type
basic_ofstream(const std::string& __s,
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:737:23: error: ‘
string’ in namespace ‘std::std’ does not name a type
open(const std::string& __s,
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:834:32: error: ‘
string’ in namespace ‘std::std’ does not name a type
basic_fstream(const std::string& __s,
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:910:23: error: ‘
string’ in namespace ‘std::std’ does not name a type
open(const std::string& __s,
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc: In member
function ‘virtual std::std::basic_filebuf<_chart _="">Traits>::int_type std::std::basic_filebuf<_>CharT, _Traits>::underflow()’:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:311:18:
error: ‘min’ is not a member of ‘std::std’
__ilen = std::min(__avail, __buflen);
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:311:18:
note: suggested alternative:
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
algorithm:62:0,
from /usr/local/include/boost/random/additive_combine.hpp:
21,
from /usr/local/include/boost/random.hpp:36,
from rng2.h:8,
from main.cpp:4:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/stl_algo.h:3444:5: note
min(initializer_list<_tp> __l, _Compare __comp)
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc: In member
function ‘virtual std::streamsize std::std::basic_f
ilebuf<_chart _traits="">::xsputn(const _CharT*,
std::streamsize)’:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:657:31:
error: ‘min’ is not a member of ‘std::std’
const streamsize __limit = std::min(__chunk, __bufavail);
^
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:657:31:
note: suggested alternative:
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
algorithm:62:0,
from /usr/local/include/boost/random/additive_combine.hpp:
21,
from /usr/local/include/boost/random.hpp:36,
from rng2.h:8,
from main.cpp:4:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/stl_algo.h:3444:5: note
min(initializer_list<_tp> __l, _Compare __comp)
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc: At global
scope:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:968:43:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_filebuf;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:72:11: error:
provided for ‘template class
std::std::basic_filebuf’
class basic_filebuf : public basic_streambuf<_chart _traits="">
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:969:44:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_ifstream;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:430:11: error:
provided for ‘template clas
s std::std::basic_ifstream’
class basic_ifstream : public basic_istream<_chart _traits="">
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:970:44:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_ofstream;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:602:11: error:
provided for ‘template clas
s std::std::basic_ofstream’
class basic_ofstream : public basic_ostream<_chart>
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:971:43:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_fstream;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:779:11: error:
provided for ‘template clas
s std::std::basic_fstream’
class basic_fstream : public basic_iostream<_chart _traits="">
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:974:46:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_filebuf;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:72:11: error:
provided for ‘template class
std::std::basic_filebuf’
class basic_filebuf : public basic_streambuf<_chart _traits="">
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:975:47:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_ifstream;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:430:11: error:
provided for ‘template clas
s std::std::basic_ifstream’
class basic_ifstream : public basic_istream<_chart _traits="">
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:976:47:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_ofstream;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:602:11: error:
provided for ‘template clas
s std::std::basic_ofstream’
class basic_ofstream : public basic_ostream<_chart>
^
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
fstream:939:0,
from dumpfile.h:5,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/fstream.tcc:977:46:
error: wrong number of template arguments (1, should b
e 2)
extern template class basic_fstream;
^
In file included from dumpfile.h:5:0,
from main.cpp:8:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/fstream:779:11: error:
provided for ‘template clas
s std::std::basic_fstream’
class basic_fstream : public basic_iostream<_chart _traits="">
^
In file included from main.cpp:8:0:
dumpfile.h:10:52: error: ‘vector’ in namespace ‘std::std’ does not name
a template type
void dump_to_file(const char* filename, const std::vector& v_d){
^
dumpfile.h:10:58: error: expected ‘,’ or ‘...’ before ‘void dump_to_file(const char* filename, const std::vector& v_d){
^
dumpfile.h: In function ‘void std::dump_to_file(const char*, int)’:
dumpfile.h:11:2: error: ‘ofstream’ is not a member of ‘std::std’
std::ofstream ofs(filename);
^
dumpfile.h:11:2: note: suggested alternative:
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/ios:38
from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
iostream:39,
from main.cpp:3:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/iosfwd:160:34: note: ‘std
typedef basic_ofstream ofstream;
^
In file included from main.cpp:8:0:
dumpfile.h:12:6: error: ‘ofs’ was not declared in this scope
if(!ofs){
^
dumpfile.h:13:9: error: ‘cerr’ is not a member of ‘std::std’
std::cerr<^
dumpfile.h:13:9: note: suggested alternative:
In file included from main.cpp:3:0:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/iostream:62:18: note: ‘
std::cerr’
extern ostream cerr; /// Linked to standard error (unbuffered)
^
In file included from main.cpp:8:0:
dumpfile.h:16:2: error: ‘copy’ is not a member of ‘std::std’
std::copy(v_d.begin(), v_d.end(), std::ostream_iterator(ofs, "n"));
^
dumpfile.h:16:2: note: suggested alternative:
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/
locale_facets.h:48:0,
from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/
basic_ios.h:37,
from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/ios:44,
from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
iostream:39,
from main.cpp:3:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/streambuf_iterator.h:
293:5: note: ‘std::copy’
copy(istreambuf_iterator<_chart> __first,
^
In file included from main.cpp:8:0:
dumpfile.h:16:12: error: ‘v_d’ was not declared in this scope
std::copy(v_d.begin(), v_d.end(), std::ostream_iterator(ofs, "n"));
^
dumpfile.h:16:36: error: ‘ostream_iterator’ is not a member of ‘std::std’
std::copy(v_d.begin(), v_d.end(), std::ostream_iterator(ofs, "n"));
^
dumpfile.h:16:36: note: suggested alternative:
In file included from /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/
iterator:66:0,
from /usr/local/include/boost/random/lagged_fibonacci.hpp:
23,
from /usr/local/include/boost/random.hpp:40,
from rng2.h:8,
from main.cpp:4:
/usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/stream_iterator.h:154:
11: note: ‘std::ostream_iterator’
class ostream_iterator
^
In file included from main.cpp:8:0:
dumpfile.h:16:59: error: expected primary-expression before ‘>’ token
std::copy(v_d.begin(), v_d.end(), std::ostream_iterator(ofs, "n"));
^
dumpfile.h:16:61: error: ‘ofs’ was not declared in this scope
std::copy(v_d.begin(), v_d.end(), std::ostream_iterator(ofs, "n"));
^
dumpfile.h: At global scope:
dumpfile.h:21:41: error: ‘std::std::vector’ has not been declared
void dump_to_file(const char* ofs, std::vector > arr)
^
dumpfile.h:21:47: error: expected ‘,’ or ‘...’ before ‘void dump_to_file(const char* ofs, std::vector > arr)
^
dumpfile.h:21:6: error: redefinition of ‘template void std::dump_
to_file(const char*, int)’
void dump_to_file(const char* ofs, std::vector > arr)
^
dumpfile.h:10:6: note: ‘template void std::dump_to_file(const char
*, int)’ previously declared here
void dump_to_file(const char* filename, const std::vector& v_d){
^
avatar
s*u
4
我的经验是一个工作日内就能显示
avatar
x*a
5
a lot lines are
error: ‘***’ is not a member of ‘std::std’, *** is something such as
endl, string, etc.

I

【在 x******a 的大作中提到】
: I got thousands problems on the following piece of code "dumpfile.h" when I
: compile under cygwin. it is ok under visual stduio... can anyone help?
: Thanks!
: #include
: #include
: #include //ostream_iterator
: #include //cerr
: #include //std::copy
: template
: void dump_to_file(const char* filename, const std::vector& v_d){

avatar
p*w
6
多谢,我从前的经验也差不多

【在 s******u 的大作中提到】
: 我的经验是一个工作日内就能显示
avatar
N*K
7
cygwin 头文件没有包含进去?

I

【在 x******a 的大作中提到】
: I got thousands problems on the following piece of code "dumpfile.h" when I
: compile under cygwin. it is ok under visual stduio... can anyone help?
: Thanks!
: #include
: #include
: #include //ostream_iterator
: #include //cerr
: #include //std::copy
: template
: void dump_to_file(const char* filename, const std::vector& v_d){

avatar
x*a
8
If I compile separately with g++ -std=c++11. It works.
but if I use the following makefile, it does not work.
CPP = g++
CXXFLAGS = -std=c++11
#-pedantic
OFLAG = -Wall -o
LFLAG = -l
IFLAG = -I
LIBFLAG = -L
LIBDIR = /usr/local/lib/
INCLUDEDIR = /usr/local/include/
DEBUGF = -g -D DEBUG
DEBUG = no
.SUFFIXES: .exe .cpp
.cpp.exe:
$(CPP) $(OFLAG) [email protected] $<
[email protected]
main.exe: main.cpp
$(CPP) $(CXXFLAGS) $(IFLAG) $(INCLUDEDIR) $(OFLAG) boost.exe main.cpp $(
LIBFLAG) $(LIBDIR) $(LFLAG) libboost_regex
avatar
d*i
9
Must be some errors in your Makefile.
I compiled using GCC 4.4 on CentOS without C++11 flag turned on. It returns
no error:
$ g++ -o dump dump.cpp
dump.cpp:
#include
#include //ostream_iterator
#include //cerr
#include //std::copy
template
void dump_to_file(const char* filename, const std::vector& v_d){
std::ofstream ofs(filename);
if(!ofs){
std::cerr<return ;
}
std::copy(v_d.begin(), v_d.end(), std::ostream_iterator(ofs, "n"));
ofs.close();
}
int main()
{
int data_array[] = {1, 2, 3, 4};
std::vector data(data_array, data_array+sizeof(data_array)/sizeof(
int));
dump_to_file("record.txt", data);
}

I

【在 x******a 的大作中提到】
: I got thousands problems on the following piece of code "dumpfile.h" when I
: compile under cygwin. it is ok under visual stduio... can anyone help?
: Thanks!
: #include
: #include
: #include //ostream_iterator
: #include //cerr
: #include //std::copy
: template
: void dump_to_file(const char* filename, const std::vector& v_d){

avatar
d*i
10
Your Makefile doesn't obey the Makefile convention: You should use CC or CXX
in place of CPP, should be CFLAGS in place of OFLAG, should be LDFLAGS
instead of LFLAG, "-I" flag should be used in conjunction with -I${LOCAL_
INCLUDE_PATH}. rule target should be the object or executable file rather
than src file...

【在 x******a 的大作中提到】
: If I compile separately with g++ -std=c++11. It works.
: but if I use the following makefile, it does not work.
: CPP = g++
: CXXFLAGS = -std=c++11
: #-pedantic
: OFLAG = -Wall -o
: LFLAG = -l
: IFLAG = -I
: LIBFLAG = -L
: LIBDIR = /usr/local/lib/

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。